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

The following examples show how to use com.alibaba.fastsql.sql.repository.SchemaRepository. These examples are extracted from open source projects. 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 Project: canal-1.1.3   Source File: FastsqlSchemaTest.java    License: 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 Project: canal   Source File: FastsqlSchemaTest.java    License: 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 Project: canal-1.1.3   Source File: MemoryTableMeta.java    License: Apache License 2.0 4 votes vote down vote up
public SchemaRepository getRepository() {
    return repository;
}
 
Example 4
Source Project: canal   Source File: MemoryTableMeta.java    License: Apache License 2.0 4 votes vote down vote up
public SchemaRepository getRepository() {
    return repository;
}