public DBColumnGroupList(DBTable table) : base(table) { }
public DBComparer(DBTable table, string column, ListSortDirection direction = ListSortDirection.Ascending) : this(table, table.ParseColumn(column), column, direction) { }
public override void Dispose() { Table = null; base.Dispose(); }
public IEnumerable <DBColumn> GetByReference(DBTable table) { return(Select(DBColumn.ReferenceTableInvoker <T> .Instance, CompareType.Equal, table.Name)); }
public DBTableView() : this(DBTable.GetTable <T>(null, false), (QParam)null, DBViewKeys.None, DBStatus.Empty) { }
public DBTableItemList(DBTable table) : base() { Table = table; }
public DBIndexList(DBTable table) : base(table) { }
public DBForeignList(DBTable table) : base(table) { Indexes.Add(DBForeignKey.ReferenceNameInvoker.Instance); Indexes.Add(DBForeignKey.ReferenceTableNameInvoker.Instance); Indexes.Add(DBForeignKey.PropertyInvoker.Instance); }
public DBForeignKey(DBColumn column, DBTable value) : this() { Column = column; Reference = value.PrimaryKey; }
public override void FormatInsertSequence(StringBuilder command, DBTable table, DBItem row) { throw new NotSupportedException(); }
public static DBCommand Build(DBTable table, string procName, DBCommandTypes type, IEnumerable <DBColumn> columns = null) { if (table.PrimaryKey == null && (type == DBCommandTypes.Delete || type == DBCommandTypes.Update)) { return(null); } if (columns == null) { columns = table.Columns; } string commandText = procName; string prefix = table.Schema.System.ParameterPrefix; CommandType ctype = CommandType.StoredProcedure; if (string.IsNullOrEmpty(procName)) { ctype = CommandType.Text; commandText = table.Schema.System.FormatCommand(table, type, null, columns); } var command = new DBCommand(commandText, ctype); if (type == DBCommandTypes.Delete) { command.Parameters.Add(new DBCommandParameter(table.PrimaryKey, prefix) { Direction = ParameterDirection.Input }); } else { DBCommandParameter paramId = null; if (table.PrimaryKey != null) { paramId = new DBCommandParameter(table.PrimaryKey, prefix) { Direction = ParameterDirection.Input }; if (type == DBCommandTypes.Insert || type == DBCommandTypes.InsertSequence) { command.Parameters.Add(paramId); } //else if (type == DBCommandTypes.InsertSequence) //{ //command.Parameters.Add(paramId); //paramId.Direction = ParameterDirection.InputOutput; //} } foreach (var column in columns) { if (column.ColumnType == DBColumnTypes.Default && column != table.PrimaryKey) { var prm = new DBCommandParameter(column, prefix); if (ctype == CommandType.Text) { prm.Direction = ParameterDirection.Input; } command.Parameters.Add(prm); } } if (paramId != null && type == DBCommandTypes.Update) { command.Parameters.Add(paramId); } } return(command); }
public DBTableView(DBTable <T> table, string defaultFilter, DBViewKeys mode = DBViewKeys.None, DBStatus statusFilter = DBStatus.Empty) : this(table, !string.IsNullOrEmpty(defaultFilter) ? new QParam(table, defaultFilter) : null, mode, statusFilter) { }
public DBTableView(QParam defaultFilter, DBViewKeys mode = DBViewKeys.None, DBStatus statusFilter = DBStatus.Empty) : this(DBTable.GetTable <T>(null, false), defaultFilter, mode, statusFilter) { }
public QTable(DBTable table, string alias = null) { Table = table; this.alias = alias; }
public override void Initialize(Type type) { BaseTable = DBTable.GetTableAttribute(BaseType); base.Initialize(type); }
public DBConstraintList(DBTable table) : base(table) { Indexes.Add(DBConstraintColumnNameInvoker <T> .Instance); }
public DBLogTable(DBTable table) { BaseTable = table; }
public IEnumerable <DBForeignKey> GetByReference(DBTable reference) { return(Select(DBForeignKey.ReferenceTableNameInvoker.Instance, CompareType.Equal, reference.FullName)); }
public static Dictionary <DBColumn, int> WriteColumns(BinaryWriter bw, DBTable tble) { return(WriteColumns(bw, tble.Columns)); }