Ejemplo n.º 1
0
        public void SetQueueSequenceValue(long value)
        {
            var connection = Database.GetDbConnection();

            connection.Open();
            using (var cmd = connection.CreateCommand())
            {
                cmd.CommandText = PostgressSql.SetQueueSequenceVal(value);
                var obj = cmd.ExecuteScalar();
            }
            connection.Close();
        }
Ejemplo n.º 2
0
        // TODO refactor sequence part
        public long GetNextQueueSequenceValue()
        {
            var connection = Database.GetDbConnection();

            connection.Open();
            long result = 0;

            using (var cmd = connection.CreateCommand())
            {
                cmd.CommandText = PostgressSql.GetQueueSequenceVal();
                var obj = cmd.ExecuteScalar();
                result = (long)obj;
            }
            connection.Close();
            return(result);
        }