use of org.infinispan.persistence.jdbc.impl.table.TableName in project infinispan by infinispan.
the class TableNameTest method testEmptySchema.
@Test(expectedExceptions = IllegalArgumentException.class)
public void testEmptySchema() {
TableName tableName = new TableName(IDENTIFIER_QUOTE, ".ISPN", "FOOBAR");
assertEquals(tableName.getSchema(), "");
}
use of org.infinispan.persistence.jdbc.impl.table.TableName in project infinispan by infinispan.
the class TableNameTest method testSchema.
public void testSchema() {
TableName tableName = new TableName(IDENTIFIER_QUOTE, "TEST.ISPN", "FOOBAR");
assertEquals(tableName.getSchema(), "TEST");
assertEquals(tableName.getName(), "ISPN_FOOBAR");
assertEquals(tableName.toString(), "\"TEST\".\"ISPN_FOOBAR\"");
tableName = new TableName(IDENTIFIER_QUOTE, "ISPN", "FOOBAR");
assertEquals(tableName.getSchema(), null);
assertEquals(tableName.getName(), "ISPN_FOOBAR");
assertEquals(tableName.toString(), "\"ISPN_FOOBAR\"");
}
use of org.infinispan.persistence.jdbc.impl.table.TableName in project infinispan by infinispan.
the class TableNameTest method testName.
public void testName() {
TableName tableName = new TableName(IDENTIFIER_QUOTE, "ISPN", "FOOBäR");
assertEquals(tableName.toString(), "\"ISPN_FOOB_R\"");
}
use of org.infinispan.persistence.jdbc.impl.table.TableName in project infinispan by infinispan.
the class TxStoreTest method assertRowCount.
private void assertRowCount(int rowCount) {
JdbcStringBasedStore jdbcStore = (JdbcStringBasedStore) store.delegate();
ConnectionFactory connectionFactory = jdbcStore.getConnectionFactory();
TableName tableName = jdbcStore.getTableManager().getDataTableName();
int value = UnitTestDatabaseManager.rowCount(connectionFactory, tableName);
assert value == rowCount : "Expected " + rowCount + " rows, actual value is " + value;
}
use of org.infinispan.persistence.jdbc.impl.table.TableName in project infinispan by infinispan.
the class JdbcStringBasedStoreAltMapperTest method rowCount.
protected int rowCount() {
ConnectionFactory connectionFactory = getConnection();
TableName tableName = tableManager.getDataTableName();
return UnitTestDatabaseManager.rowCount(connectionFactory, tableName);
}
Aggregations