コード例 #1
0
ファイル: UpdateQueryBase.cs プロジェクト: wtfcolt/game
        /// <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);
        }
コード例 #2
0
        /// <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);
        }