Exemplo n.º 1
0
 public override void SetGeneratedColumnInfo(int generate, ResultMetaData meta)
 {
     if (base.type == 50)
     {
         int identityColumnIndex = base.BaseTable.GetIdentityColumnIndex();
         if (identityColumnIndex != -1)
         {
             this.GeneratedType          = generate;
             this.GeneratedInputMetaData = meta;
             if (generate != 1)
             {
                 if (generate == 2)
                 {
                     return;
                 }
             }
             else
             {
                 base.GeneratedIndexes = new int[] { identityColumnIndex };
             }
             base.generatedResultMetaData = ResultMetaData.NewResultMetaData(base.GeneratedIndexes.Length);
             for (int i = 0; i < base.GeneratedIndexes.Length; i++)
             {
                 base.generatedResultMetaData.columns[i] = base.BaseTable.GetColumn(base.GeneratedIndexes[i]);
             }
             base.generatedResultMetaData.PrepareData();
             this.IsSimpleInsert = false;
         }
     }
 }
Exemplo n.º 2
0
        private ResultMetaData GetResultTableMetaData()
        {
            ResultMetaData data = ResultMetaData.NewResultMetaData(this.ReturnTable.GetColumnCount());

            for (int i = 0; i < this.ReturnTable.GetColumnCount(); i++)
            {
                data.columns[i]     = this.ReturnTable.GetColumn(i);
                data.ColumnTypes[i] = this.ReturnTable.GetColumnTypes()[i];
            }
            return(data);
        }
Exemplo n.º 3
0
        private static ResultMetaData GetResultMetaData(UtlDataRecord record)
        {
            System.Data.LibCore.Clr.UtlMetaData[] metaData = record.GetMetaData();
            int length = metaData.Length;

            int[]     baseColumnIndexes = new int[length];
            SqlType[] types             = new SqlType[length];
            for (int i = 0; i < length; i++)
            {
                baseColumnIndexes[i] = i;
                types[i]             = GetDataType(metaData[i]);
            }
            return(ResultMetaData.NewResultMetaData(types, baseColumnIndexes, length, length));
        }
Exemplo n.º 4
0
        public override ResultMetaData GetResultMetaData()
        {
            if (this._resultMetaData != null)
            {
                return(this._resultMetaData);
            }
            if (base.type != 7)
            {
                throw Error.RuntimeError(0xc9, "StatementProcedure");
            }
            if (this._expression == null)
            {
                return(ResultMetaData.EmptyResultMetaData);
            }
            ResultMetaData data2 = ResultMetaData.NewResultMetaData(1);
            ColumnBase     base2 = new ColumnBase(null, null, null, StatementDMQL.ReturnColumnName);

            base2.SetType(this._expression.GetDataType());
            data2.columns[0] = base2;
            data2.PrepareData();
            this._resultMetaData = data2;
            return(data2);
        }