/// <summary>
 /// Initializes a new instance of the <see cref="SelectGuildMembersListQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">DbConnectionPool to use for creating connections to execute the query on.</param>
 public SelectGuildMembersListQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(CharacterTable.DbKeyColumns, "id");
     QueryAsserts.ContainsColumns(CharacterTable.DbColumns, "name");
     QueryAsserts.ContainsColumns(GuildMemberTable.DbColumns, "rank", "character_id", "guild_id");
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateItemFieldQuery"/> class.
        /// </summary>
        /// <param name="connectionPool">The connection pool.</param>
        /// <exception cref="ArgumentNullException"><paramref name="connectionPool" /> is <c>null</c>.</exception>
        public UpdateItemFieldQuery(DbConnectionPool connectionPool)
        {
            if (connectionPool == null)
            {
                throw new ArgumentNullException("connectionPool");
            }

            _connectionPool = connectionPool;

            _fieldQueryCache =
                new HashCache <string, InternalUpdateItemFieldQuery>(
                    x => new InternalUpdateItemFieldQuery(_connectionPool, GetFieldQueryString(x, connectionPool.QueryBuilder)));

            QueryAsserts.ArePrimaryKeys(ItemTable.DbKeyColumns, "id");
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SelectItemTemplateQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public SelectItemTemplateQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(ItemTemplateTable.DbKeyColumns, "id");
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeleteMapSpawnQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public DeleteMapSpawnQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(MapSpawnTable.DbKeyColumns, "id");
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DbQueryNonReader"/> class.
 /// </summary>
 /// <param name="connectionPool"><see cref="DbConnectionPool"/> to use for creating connections to
 /// execute the query on.</param>
 public UpdateGuildQuery(DbConnectionPool connectionPool) : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(GuildTable.DbKeyColumns, "id");
     QueryAsserts.ContainsColumns(GuildTable.DbColumns, "name", "tag", "id");
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetAccountCurrentIPNullQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public SetAccountCurrentIPNullQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(AccountTable.DbKeyColumns, "id");
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PeerTradingGetLostCashQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The <see cref="DbConnectionPool"/> to use for creating connections to execute the query on.</param>
 public PeerTradingGetLostCashQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ContainsColumns(ActiveTradeCashTable.DbColumns, "cash");
     QueryAsserts.ArePrimaryKeys(ActiveTradeCashTable.DbKeyColumns, "character_id");
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountIDCreator"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public AccountIDCreator(DbConnectionPool connectionPool) : base(connectionPool, AccountTable.TableName, "id", 64)
 {
     QueryAsserts.ArePrimaryKeys(AccountTable.DbKeyColumns, "id");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateCharacterStatusEffectQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public UpdateCharacterStatusEffectQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(CharacterStatusEffectTable.DbKeyColumns, "id");
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SelectAllianceIDsQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public SelectAllianceIDsQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(AllianceTable.DbKeyColumns, "id");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DeleteCharacterInventoryItemQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public DeleteCharacterInventoryItemQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(CharacterInventoryTable.DbKeyColumns, "character_id", "slot");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InsertCharacterTemplateIDOnlyQuery"/> class.
 /// </summary>
 /// <param name="connectionPool"><see cref="DbConnectionPool"/> to use for creating connections to
 /// execute the query on.</param>
 public InsertCharacterTemplateIDOnlyQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(CharacterTemplateTable.DbKeyColumns, "id");
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PeerTradingRemoveItemQuery"/> class.
 /// </summary>
 /// <param name="connectionPool"><see cref="DbConnectionPool"/> to use for creating connections to
 /// execute the query on.</param>
 public PeerTradingRemoveItemQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(ActiveTradeItemTable.DbKeyColumns, "item_id");
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SelectCharacterByIDQuery"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public SelectCharacterByIDQuery(DbConnectionPool connectionPool)
     : base(connectionPool, CreateQuery(connectionPool.QueryBuilder))
 {
     QueryAsserts.ArePrimaryKeys(CharacterTable.DbKeyColumns, "id");
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MapSpawnValuesIDCreator"/> class.
 /// </summary>
 /// <param name="connectionPool">The connection pool.</param>
 public MapSpawnValuesIDCreator(DbConnectionPool connectionPool) : base(connectionPool, MapSpawnTable.TableName, "id", 1)
 {
     QueryAsserts.ArePrimaryKeys(MapSpawnTable.DbKeyColumns, "id");
 }