Esempio n. 1
0
        /// <summary>
        /// Build in list predicate using temporary database table
        /// </summary>
        /// <param name="eqp"></param>
        /// <param name="baseSql"></param>
        /// <param name="keyName"></param>
        /// <param name="keyList"></param>
        /// <param name="firstKeyIdx"></param>
        /// <param name="keyCount"></param>
        /// <returns></returns>

        public string BuildTempDbTableKeyListPredicate(
            ExecuteQueryParms eqp,
            ref string baseSql,
            string keyName,
            List <string> keyList,
            int firstKeyIdx,
            int keyCount)
        {
            bool intKey = true;

            if (QueryEngine.AllowNetezzaUse && eqp.AllowNetezzaUse)             // && keyCount > MaxNetzzaInListItemCount)
            {
                return(DbCommandMx.BuildNetezzaTempDbTableKeyListPredicate(keyName, keyList, firstKeyIdx, keyCount));
            }

            else             // if (keyCount > MaxOracleInListItemCount)
            {
                return(DbCommandMx.BuildOracleTempDbTableKeyListPredicate(ref baseSql, keyName, intKey, keyList, firstKeyIdx, keyCount));
            }
        }