public final class JdbcFactory extends Object implements JdbcDatabase
| Modifier and Type | Method and Description |
|---|---|
boolean |
createTable(RepositoryDefinition repositoryDefinition)
Creates table with the specified repository definition.
|
boolean |
existTable(String tableName)
Checks whether a table specified by the given table name exists.
|
static JdbcFactory |
getInstance()
Gets the singleton instance of JdbcFactory.
|
String |
getRandomlySql(String tableName,
int fetchSize)
getRandomlySql.
|
String |
queryPage(int start,
int end,
String selectSql,
String filterSql,
String orderBySql,
String tableName)
queryPage sql.
|
public boolean existTable(String tableName)
JdbcDatabaseexistTable in interface JdbcDatabasetableName - the given table nametrue if it exists, returns false otherwisepublic boolean createTable(RepositoryDefinition repositoryDefinition) throws SQLException
JdbcDatabasecreateTable in interface JdbcDatabaserepositoryDefinition - the specified repository definitiontrue if successfully, returns false otherwiseSQLException - SQLExceptionpublic static JdbcFactory getInstance()
public String queryPage(int start, int end, String selectSql, String filterSql, String orderBySql, String tableName)
JdbcDatabasequeryPage in interface JdbcDatabasestart - startend - endselectSql - selectSqlfilterSql - filterSqlorderBySql - orderBySqltableName - tableNamepublic String getRandomlySql(String tableName, int fetchSize)
JdbcDatabasegetRandomlySql in interface JdbcDatabasetableName - tableNamefetchSize - fetchSizeCopyright © 2009–2019 B3log. All rights reserved.