Пример #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)}");
 }
Пример #2
0
 public static string GenerateStandardDeleteStatement(DatabaseModel model, string primaryKeyFieldName, object primaryKeyValue)
 {
     return($"DELETE FROM {model.TableName()} WHERE {GetDatabaseTableFieldName(model, primaryKeyFieldName)} = {MySQLDBCommon.SetValueForSql(primaryKeyValue)}");
 }
Пример #3
0
 public static string GenerateStandardInsertStatement(DatabaseModel model)
 {
     return($"INSERT INTO {model.TableName()} {GenerateInsertFields(model)}");
 }