Exemple #1
0
        public static string Delete(this ISqlDialect d, IDataDescriptor descriptor, string table, string schema)
        {
            return(Pooling.StringBuilderPool.Scoped(sb =>
            {
                if (!d.BeforeDelete(descriptor, sb))
                {
                    return;
                }

                sb.Append("DELETE FROM ");
                sb.AppendTable(d, table, schema);
            }));
        }
Exemple #2
0
        public static string Delete(this ISqlDialect d, IDataDescriptor descriptor, string table, string schema,
                                    List <string> keys, List <string> parameters)
        {
            return(Pooling.StringBuilderPool.Scoped(sb =>
            {
                if (!d.BeforeDelete(descriptor, sb))
                {
                    return;
                }

                sb.Append("DELETE FROM ");
                sb.AppendTable(d, table, schema);

                if (!d.BeforeWhere(descriptor, sb, keys, parameters))
                {
                    return;
                }

                sb.AppendWhereClause(descriptor, d, keys, parameters);
            }));
        }