internal SqlInsertTable(Sql database, SqlTable table, string[] columns) : base(database, table, SqlExecuteType.Execute) { this.columns = columns; }
public override string FormatDeleteFromWhere(SqlTable table, string where, bool output) => $"delete from {table.Ident}{FormatOutput(output)}{FormatWhere(where)}";
public override string FormatDeleteTableFromWhere(SqlTable table, string whereColumn, object[] whereKeys, bool output) => $"delete from {table.Ident}{FormatOutput(output)} where {whereColumn} in {FormatQuery(whereKeys)}";
public override string FormatUpdateSetWhere(SqlTable table, string set, string where, bool output) => $"update {table.Ident} set {set}{FormatOutput(output)}{FormatWhere(where)}";
public override string FormatUpdateTableWhere(SqlTable table, string whereColumn, object[] whereKeys, bool output) => $"{FormatOutput(output)} where {whereColumn} in {FormatQuery(whereKeys)}";
public override string FormatFromAlias(SqlTable table) => $"{FormatFromStatementOrTable(table)}{(table.TableSample > 0 ? $" tablesample({table.TableSample})" : "")}{table.Alias.Format(s => $" {s}")}";
public override string FormatInsertIntoValues(SqlTable table, string[] columns, bool output) => $"insert into {table.Ident}({columns.Join(", ")}){FormatOutput(output)} values";
internal SqlQueryBase(Sql database, SqlTable table, SqlExecuteType type) : base(database) { Table = table; Type = type; }
internal SqlUpdateEntry(Sql database, SqlTable table) : base(database, table) { }
internal SqlUpdateTableEntry(Sql database, SqlTable table, object where, SqlExecuteBase updateTable) : base(database, table) { Where = where; this.updateTable = updateTable; }
internal SqlUpdateTable(Sql database, SqlTable table, string whereColumn) : base(database, table, SqlExecuteType.Execute) { WhereColumn = whereColumn; }
internal SqlUpdateEntryBase(Sql database, SqlTable table) : base(database, table, SqlExecuteType.Execute) { Update = new SqlUpdateSets(); }
internal SqlDeleteTable(Sql database, SqlTable table, string whereColumn) : base(database, table, SqlExecuteType.Execute) { WhereColumn = whereColumn; entries = new List <object>(); }
internal SqlDeleteEntry(Sql database, SqlTable table) : base(database, table, SqlExecuteType.Execute) { }