Exemple #1
0
        public void TestInt()
        {
            IColumn column = new BigIntColumn("foo", 20);

            column.NotNull();
            column.AutoIncrement();
            Assert.Equal("`foo` BIGINT(20) NOT NULL AUTO_INCREMENT", generator.ToSQL(column));
        }
        private void AppendFilterPaging()
        {
            BigIntColumn orderColumn = VLatest.Instance.Watermark;
            string       tableAlias  = InstanceTableAlias;

            if (_queryExpression.IsStudyIELevel())
            {
                orderColumn = VLatest.Study.StudyKey;
                tableAlias  = StudyTableAlias;
            }
            else if (_queryExpression.IsSeriesIELevel())
            {
                orderColumn = VLatest.Series.SeriesKey;
                tableAlias  = SeriesTableAlias;
            }

            _stringBuilder.Append($"ORDER BY ")
            .Append(orderColumn, tableAlias)
            .AppendLine();
            _stringBuilder.AppendLine($"OFFSET {_queryExpression.Offset} ROWS");
            _stringBuilder.AppendLine($"FETCH NEXT {_queryExpression.EvaluatedLimit} ROWS ONLY");
        }