Пример #1
0
        public override XVar queryPage(XVar strSQL, XVar pageStart, XVar pageSize, XVar applyLimit)
        {
            if (applyLimit)
            {
                strSQL = CommonFunctions.AddTop(strSQL, pageStart * pageSize);
            }

            var qResult = query(strSQL);

            qResult.seekPage(pageSize, pageStart);

            return(qResult);
        }
Пример #2
0
        public override XVar queryPage(dynamic _param_connection, dynamic _param_strSQL, dynamic _param_pageStart, dynamic _param_pageSize, dynamic _param_applyLimit)
        {
            #region pass-by-value parameters
            dynamic connection = XVar.Clone(_param_connection);
            dynamic strSQL     = XVar.Clone(_param_strSQL);
            dynamic pageStart  = XVar.Clone(_param_pageStart);
            dynamic pageSize   = XVar.Clone(_param_pageSize);
            dynamic applyLimit = XVar.Clone(_param_applyLimit);
            #endregion

            dynamic qResult = null;
            if (XVar.Pack(applyLimit))
            {
                strSQL = XVar.Clone(CommonFunctions.AddTop((XVar)(strSQL), (XVar)(pageStart * pageSize)));
            }
            qResult = XVar.Clone(connection.query((XVar)(strSQL)));
            qResult.seekPage((XVar)(pageSize), (XVar)(pageStart));
            return(qResult);
        }