/// <summary> /// Initializes a new instance of the <see cref="QueryResultFilterBase"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="parent"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> protected QueryResultFilterBase(object parent, IQueryBuilderSettings settings) { if (parent == null) throw new ArgumentNullException("parent"); if (settings == null) throw new ArgumentNullException("settings"); _parent = parent; _settings = settings; }
/// <summary> /// Initializes a new instance of the <see cref="DeleteQueryBase"/> class. /// </summary> /// <param name="table">The table.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="InvalidQueryException"><paramref name="table"/> is an invalid table name.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> protected DeleteQueryBase(string table, IQueryBuilderSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); _table = table; _settings = settings; Settings.IsValidTableName(table, true); }
/// <summary> /// Initializes a new instance of the <see cref="UpdateQueryBase"/> class. /// </summary> /// <param name="table">The table name.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="InvalidQueryException"><paramref name="table"/> is not a valid table name.</exception> protected UpdateQueryBase(string table, IQueryBuilderSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); _table = table; _settings = settings; Settings.IsValidTableName(table, true); _c = new ColumnValueCollectionBuilder<IUpdateQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="InsertODKUQueryBase"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="parent"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> protected InsertODKUQueryBase(IInsertQuery parent, IQueryBuilderSettings settings) { if (parent == null) throw new ArgumentNullException("parent"); if (settings == null) throw new ArgumentNullException("settings"); _parent = parent; _settings = settings; _c = new ColumnValueCollectionBuilder<IInsertODKUQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="SelectQueryBase"/> class. /// </summary> /// <param name="function">The name of the function.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="function"/> is null or empty.</exception> protected SelectFunctionQueryBase(string function, IQueryBuilderSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); if (string.IsNullOrEmpty(function)) throw new ArgumentNullException("function"); _function = function; _settings = settings; _c = new ValueCollectionBuilder<ISelectFunctionQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="SelectQueryBase"/> class. /// </summary> /// <param name="procedure">The name of the stored procedure.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="procedure"/> is null or empty.</exception> protected CallProcedureQueryBase(string procedure, IQueryBuilderSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); if (string.IsNullOrEmpty(procedure)) throw new ArgumentNullException("procedure"); _procedure = procedure; _settings = settings; _c = new ValueCollectionBuilder<ICallProcedureQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="DeleteQueryBase"/> class. /// </summary> /// <param name="table">The table.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="InvalidQueryException"><paramref name="table"/> is an invalid table name.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> protected DeleteQueryBase(string table, IQueryBuilderSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } _table = table; _settings = settings; Settings.IsValidTableName(table, true); }
/// <summary> /// Initializes a new instance of the <see cref="SelectQueryBase"/> class. /// </summary> /// <param name="table">The table.</param> /// <param name="alias">The alias for the <paramref name="table"/>.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="InvalidQueryException"><paramref name="table"/> is not a valid table name.</exception> /// <exception cref="InvalidQueryException"><paramref name="alias"/> is not a valid table alias.</exception> protected SelectQueryBase(string table, string alias, IQueryBuilderSettings settings) { if (settings == null) throw new ArgumentNullException("settings"); _table = table; _alias = alias; _settings = settings; Settings.IsValidTableName(table, true); Settings.IsValidTableAlias(alias, true); _c = new ColumnCollectionBuilder<ISelectQuery>(this, Settings); }
/// <summary> /// Initializes a new instance of the <see cref="QueryResultFilterBase"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="parent"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> protected QueryResultFilterBase(object parent, IQueryBuilderSettings settings) { if (parent == null) { throw new ArgumentNullException("parent"); } if (settings == null) { throw new ArgumentNullException("settings"); } _parent = parent; _settings = settings; }
/// <summary> /// Initializes a new instance of the <see cref="UpdateQueryBase"/> class. /// </summary> /// <param name="table">The table name.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="InvalidQueryException"><paramref name="table"/> is not a valid table name.</exception> protected UpdateQueryBase(string table, IQueryBuilderSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } _table = table; _settings = settings; Settings.IsValidTableName(table, true); _c = new ColumnValueCollectionBuilder <IUpdateQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="InsertODKUQueryBase"/> class. /// </summary> /// <param name="parent">The parent.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="parent"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> protected InsertODKUQueryBase(IInsertQuery parent, IQueryBuilderSettings settings) { if (parent == null) { throw new ArgumentNullException("parent"); } if (settings == null) { throw new ArgumentNullException("settings"); } _parent = parent; _settings = settings; _c = new ColumnValueCollectionBuilder <IInsertODKUQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="SelectQueryBase"/> class. /// </summary> /// <param name="procedure">The name of the stored procedure.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="procedure"/> is null or empty.</exception> protected CallProcedureQueryBase(string procedure, IQueryBuilderSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } if (string.IsNullOrEmpty(procedure)) { throw new ArgumentNullException("procedure"); } _procedure = procedure; _settings = settings; _c = new ValueCollectionBuilder <ICallProcedureQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="SelectQueryBase"/> class. /// </summary> /// <param name="function">The name of the function.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="function"/> is null or empty.</exception> protected SelectFunctionQueryBase(string function, IQueryBuilderSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } if (string.IsNullOrEmpty(function)) { throw new ArgumentNullException("function"); } _function = function; _settings = settings; _c = new ValueCollectionBuilder <ISelectFunctionQuery>(this, settings); }
/// <summary> /// Initializes a new instance of the <see cref="SelectQueryBase"/> class. /// </summary> /// <param name="table">The table.</param> /// <param name="alias">The alias for the <paramref name="table"/>.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> /// <exception cref="InvalidQueryException"><paramref name="table"/> is not a valid table name.</exception> /// <exception cref="InvalidQueryException"><paramref name="alias"/> is not a valid table alias.</exception> protected SelectQueryBase(string table, string alias, IQueryBuilderSettings settings) { if (settings == null) { throw new ArgumentNullException("settings"); } _table = table; _alias = alias; _settings = settings; Settings.IsValidTableName(table, true); Settings.IsValidTableAlias(alias, true); _c = new ColumnCollectionBuilder <ISelectQuery>(this, Settings); }
/// <summary> /// Initializes a new instance of the <see cref="ValueCollectionBuilder{T}"/> class. /// </summary> /// <param name="owner">The owner.</param> /// <param name="settings">The <see cref="IQueryBuilderSettings"/>.</param> /// <exception cref="ArgumentNullException"><paramref name="owner"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="settings"/> is null.</exception> public ValueCollectionBuilder(T owner, IQueryBuilderSettings settings) { // ReSharper disable CompareNonConstrainedGenericWithNull if (owner == null) { throw new ArgumentNullException("owner"); } // ReSharper restore CompareNonConstrainedGenericWithNull if (settings == null) { throw new ArgumentNullException("settings"); } _settings = settings; _owner = owner; }