Java Code Examples for com.alibaba.fastsql.sql.repository.SchemaRepository#findTable()
The following examples show how to use
com.alibaba.fastsql.sql.repository.SchemaRepository#findTable() .
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 |
@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 |
@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()); }