Beispiel #1
0
        public int buildSQL(DatabaseConnection dbConn, int index, StringBuilder b)
        {
            if (notExist)
            {
                b.Append(" NOT");
            }
            b.Append(" EXISTS (SELECT ").Append(selectFieldList).Append(" FROM ").Append(tableName);
            int out_index = 0;

            if (filter != null)
            {
                b.Append(filter.getWhereClause(dbConn, true, index, out out_index));
                b.Append(filter.getGroupCluase());
            }
            b.Append(")");

            return(out_index);
        }
Beispiel #2
0
        public DbCommand CreateSelectCommand(string SelectQueryWithoutConstraint, DBFilter dbFilter, ListInfo info)
        {
            int commandIndex  = 1;
            int buildSQLIndex = 1;

            string query = SelectQueryWithoutConstraint;

            DbCommand command = CreateCommand();

            command.CommandType = CommandType.Text;

            if (dbFilter != null)
            {
                query += dbFilter.getWhereClause(this, false, buildSQLIndex, out buildSQLIndex);
                query += dbFilter.getGroupCluase();
                query += dbFilter.getOrderClause(info);
                dbFilter.setParams(commandIndex, command);
            }
            command.CommandText = query;


            return(command);
        }