@Test public void testContainsPK() { List<String> insertColumns = mockInsertColumns(); mockInsertRows(); mockParameters(); doReturn(tableMeta).when(insertExecutor).getTableMeta(); when(tableMeta.containsPK(insertColumns)).thenReturn(true); Assertions.assertTrue(insertExecutor.containsPK()); when(tableMeta.containsPK(insertColumns)).thenReturn(false); Assertions.assertFalse(insertExecutor.containsPK()); }
protected boolean containsPK() { SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; List<String> insertColumns = recognizer.getInsertColumns(); TableMeta tmeta = getTableMeta(); return tmeta.containsPK(insertColumns); }
InsertExecutor extends AbstractDMLBaseExecutor<T, S> { protected boolean containsPK() { SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; List<String> insertColumns = recognizer.getInsertColumns(); TableMeta tmeta = getTableMeta(); return tmeta.containsPK(insertColumns); } }
InsertExecutor extends AbstractDMLBaseExecutor<T, S> { protected boolean containsPK() { SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; List<String> insertColumns = recognizer.getInsertColumns(); TableMeta tmeta = getTableMeta(); return tmeta.containsPK(insertColumns); } InsertExecutor(StatementProxy statementProxy, StatementCallback statementCallback,
                          SQLRecognizer sqlRecognizer); }
InsertExecutor extends AbstractDMLBaseExecutor<T, S> { protected boolean containsPK() { SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; List<String> insertColumns = recognizer.getInsertColumns(); TableMeta tmeta = getTableMeta(); return tmeta.containsPK(insertColumns); } InsertExecutor(StatementProxy statementProxy, StatementCallback statementCallback,
                          SQLRecognizer sqlRecognizer);  }
InsertExecutor extends AbstractDMLBaseExecutor<T, S> { protected boolean containsPK() { SQLInsertRecognizer recognizer = (SQLInsertRecognizer) sqlRecognizer; List<String> insertColumns = recognizer.getInsertColumns(); TableMeta tmeta = getTableMeta(); return tmeta.containsPK(insertColumns); } InsertExecutor(StatementProxy statementProxy, StatementCallback statementCallback,
                          SQLRecognizer sqlRecognizer);   }