本文整理了Java中org.greenrobot.greendao.database.Database.execSQL()
方法的一些代码示例,展示了Database.execSQL()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.execSQL()
方法的具体详情如下:
包路径:org.greenrobot.greendao.database.Database
类名称:Database
方法名:execSQL
暂无
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ORDER TRANSACTION GROUP BY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"TREE_ENTITY\" (" + //
"\"_id\" INTEGER PRIMARY KEY ," + // 0: id
"\"PARENT_ID\" INTEGER);"); // 1: parentId
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"AUTOINCREMENT_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"ABCDEF_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"EXTENDS_IMPLEMENTS_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"KEEP_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TO_ONE_TARGET2\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"JOIN_MANY_TO_DATE_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"TO_MANY_TARGET2\" (" + //
"\"_id\" INTEGER PRIMARY KEY ," + // 0: id
"\"FK_ID\" INTEGER);"); // 1: fkId
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"INDEXED_STRING_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"RELATION_SOURCE2\" (" + //
"\"_id\" INTEGER PRIMARY KEY ," + // 0: id
"\"TO_ONE_ID\" INTEGER);"); // 1: toOneId
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TREE_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"AUTOINCREMENT_ENTITY\" (" + //
"\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT );"); // 0: id
}
代码示例来源:origin: greenrobot/greenDAO
/** Creates the underlying database table. */
public static void createTable(Database db, boolean ifNotExists) {
String constraint = ifNotExists? "IF NOT EXISTS ": "";
db.execSQL("CREATE TABLE " + constraint + "\"TO_MANY_ENTITY\" (" + //
"\"_id\" INTEGER PRIMARY KEY ," + // 0: id
"\"SOURCE_JOIN_PROPERTY\" TEXT);"); // 1: sourceJoinProperty
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TO_MANY_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"TEST_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"SIMPLE_ENTITY_NOT_NULL\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
/** Drops the underlying database table. */
public static void dropTable(Database db, boolean ifExists) {
String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"CUSTOM_TYPE_ENTITY\"";
db.execSQL(sql);
}
代码示例来源:origin: greenrobot/greenDAO
public static int executeSqlStatements(Database db, String[] statements) {
int count = 0;
for (String line : statements) {
line = line.trim();
if (line.length() > 0) {
db.execSQL(line);
count++;
}
}
return count;
}
代码示例来源:origin: greenrobot/greenDAO
public void deleteAll() {
// String sql = SqlUtils.createSqlDelete(config.tablename, null);
// db.execSQL(sql);
db.execSQL("DELETE FROM '" + config.tablename + "'");
if (identityScope != null) {
identityScope.clear();
}
}
内容来源于网络,如有侵权,请联系作者删除!