Esempio n. 1
0
        private uint GetMaxGuid(ShardPreparedStatement id, uint min, uint max)
        {
            object[] critera = new object[] { min, max };
            var      res     = SelectPreparedStatement <ShardPreparedStatement>(id, critera);
            var      ret     = res.Rows[0][0];

            if (ret is DBNull)
            {
                return(uint.MaxValue);
            }

            return((uint)res.Rows[0][0]);
        }
Esempio n. 2
0
 private void ConstructMaxQueryStatement(ShardPreparedStatement id, string tableName, string columnName)
 {
     // NOTE: when moved to WordDatabase, ace_shard needs to be changed to ace_world
     AddPreparedStatement <ShardPreparedStatement>(id, $"SELECT MAX(`{columnName}`) FROM `{tableName}` WHERE `{columnName}` >= ? && `{columnName}` < ?",
                                                   MySqlDbType.UInt32, MySqlDbType.UInt32);
 }