/** * Create a new {@link Table} or {@link VirtualTable} in the database * * @param table the Table or VirtualTable to create * @return true if the statement executed without error, false otherwise */ protected boolean tryCreateTable(Table table) { SqlConstructorVisitor sqlVisitor = new SqlConstructorVisitor(); StringBuilder sql = new StringBuilder(STRING_BUILDER_INITIAL_CAPACITY); table.appendCreateTableSql(getCompileContext(), sql, sqlVisitor); return tryExecSql(sql.toString()); }
if (tables != null) { for (Table table : tables) { table.appendCreateTableSql(getCompileContext(), sql, sqlVisitor); db.execSQL(sql.toString()); sql.setLength(0);
/** * Create a new {@link Table} or {@link VirtualTable} in the database * * @param table the Table or VirtualTable to create * @return true if the statement executed without error, false otherwise */ protected boolean tryCreateTable(Table table) { SqlConstructorVisitor sqlVisitor = new SqlConstructorVisitor(); StringBuilder sql = new StringBuilder(STRING_BUILDER_INITIAL_CAPACITY); table.appendCreateTableSql(getCompileContext(), sql, sqlVisitor); return tryExecSql(sql.toString()); }
if (tables != null) { for (Table table : tables) { table.appendCreateTableSql(getCompileContext(), sql, sqlVisitor); db.execSQL(sql.toString()); sql.setLength(0);