Esempio n. 1
0
 public static string GenerateStandardUpdateStatement(DatabaseModel model, string primaryKeyFieldName, object primaryKeyValue)
 {
     return($"UPDATE {model.TableName()} SET {GenerateUpdateFields(model)} WHERE {GetDatabaseTableFieldName(model, primaryKeyFieldName)} = {MySQLDBCommon.SetValueForSql(primaryKeyValue)}");
 }
Esempio n. 2
0
 public static string GenerateStandardDeleteStatement(DatabaseModel model, string primaryKeyFieldName, object primaryKeyValue)
 {
     return($"DELETE FROM {model.TableName()} WHERE {GetDatabaseTableFieldName(model, primaryKeyFieldName)} = {MySQLDBCommon.SetValueForSql(primaryKeyValue)}");
 }
Esempio n. 3
0
 public static string GenerateStandardInsertStatement(DatabaseModel model)
 {
     return($"INSERT INTO {model.TableName()} {GenerateInsertFields(model)}");
 }