com.alibaba.fastsql.sql.repository.SchemaRepository Java Examples

The following examples show how to use com.alibaba.fastsql.sql.repository.SchemaRepository. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FastsqlSchemaTest.java    From canal-1.1.3 with Apache License 2.0 5 votes vote down vote up
@Test
public void testSimple() throws FileNotFoundException, IOException {
    SchemaRepository repository = new SchemaRepository(JdbcConstants.MYSQL);
    String sql = "create table quniya4(name varchar(255) null,value varchar(255) null,id int not null,constraint quniya4_pk primary key (id));"
                 + "alter table quniya4 modify id int not null first;";
    repository.console(sql);

    repository.setDefaultSchema("test");
    SchemaObject table = repository.findTable("quniya4");
    System.out.println(table.getStatement().toString());
}
 
Example #2
Source File: FastsqlSchemaTest.java    From canal with Apache License 2.0 5 votes vote down vote up
@Test
public void testSimple() throws FileNotFoundException, IOException {
    SchemaRepository repository = new SchemaRepository(JdbcConstants.MYSQL);
    String sql = "create table quniya4(name varchar(255) null,value varchar(255) null,id int not null,constraint quniya4_pk primary key (id));"
                 + "alter table quniya4 modify id int not null first;";
    repository.console(sql);

    repository.setDefaultSchema("test");
    SchemaObject table = repository.findTable("quniya4");
    System.out.println(table.getStatement().toString());
}
 
Example #3
Source File: MemoryTableMeta.java    From canal-1.1.3 with Apache License 2.0 4 votes vote down vote up
public SchemaRepository getRepository() {
    return repository;
}
 
Example #4
Source File: MemoryTableMeta.java    From canal with Apache License 2.0 4 votes vote down vote up
public SchemaRepository getRepository() {
    return repository;
}