use of org.hsqldb_voltpatches.HSQLInterface in project voltdb by VoltDB.
the class TestDDLCompiler method testENG_912.
//
// Before the fix for ENG-912, the following schema would work:
// create table tmc (name varchar(32), user varchar(32));
// but this wouldn't:
// create table tmc (name varchar(32), user varchar(32), primary key (name, user));
//
// Changes in HSQL's ParserDQL and ParserBase make this more consistent
//
public void testENG_912() throws HSQLParseException {
String schema = "create table tmc (name varchar(32), user varchar(32), primary key (name, user));";
HSQLInterface hsql = HSQLInterface.loadHsqldb();
hsql.runDDLCommand(schema);
VoltXMLElement xml = hsql.getXMLFromCatalog();
System.out.println(xml);
assertTrue(xml != null);
}
use of org.hsqldb_voltpatches.HSQLInterface in project voltdb by VoltDB.
the class TestDDLCompiler method testENG_2345.
//
// Before fixing ENG-2345, the VIEW definition wouldn't compile if it were
// containing single quote characters.
//
public void testENG_2345() throws HSQLParseException {
String table = "create table tmc (name varchar(32), user varchar(32), primary key (name, user));";
HSQLInterface hsql = HSQLInterface.loadHsqldb();
hsql.runDDLCommand(table);
String view = "create view v (name , user ) as select name , user from tmc where name = 'name';";
hsql.runDDLCommand(view);
VoltXMLElement xml = hsql.getXMLFromCatalog();
System.out.println(xml);
assertTrue(xml != null);
}
Aggregations