public static IPostgresTuple CreateExtendedRecordTupleFrom(global::UseCase1.FormList item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_URI_Index])
            {
                items[ExtendedProperty_URI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.URI);
            }
            if (useColumn[ExtendedProperty_Name_Index])
            {
                items[ExtendedProperty_Name_Index] = _DatabaseCommon.Utility.StringToTuple(item.Name);
            }
            if (useColumn[ExtendedProperty_Group_Index])
            {
                items[ExtendedProperty_Group_Index] = _DatabaseCommon.Utility.StringToTuple(item.Group);
            }
            if (useColumn[ExtendedProperty_Status_Index])
            {
                items[ExtendedProperty_Status_Index] = _DatabaseCommon.FactoryUseCase1_FormStatus.FormStatusConverter.CreateTupleFrom(item.Status);
            }
            if (useColumn[ExtendedProperty_SubmissionsCount_Index])
            {
                items[ExtendedProperty_SubmissionsCount_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.SubmissionsCount);
            }
            return(RecordTuple.From(items));
        }
        public static IPostgresTuple CreateExtendedRecordTupleFrom(global::UseCase1.Customer item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_ID_Index])
            {
                items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            }
            if (useColumn[ExtendedProperty_Name_Index])
            {
                items[ExtendedProperty_Name_Index] = _DatabaseCommon.Utility.StringToTuple(item.Name);
            }
            if (useColumn[ExtendedProperty_RegistrationNumber_Index])
            {
                items[ExtendedProperty_RegistrationNumber_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.RegistrationNumber);
            }
            if (item.SubmissionsURI != null)
            {
                if (useColumn[ExtendedProperty_SubmissionsURI_Index])
                {
                    items[ExtendedProperty_SubmissionsURI_Index] = ArrayTuple.Create(item.SubmissionsURI, it => new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(it));
                }
            }
            ;
            return(RecordTuple.From(items));
        }
        public static IPostgresTuple CreateExtendedTupleFrom(global::UseCase1.Submission item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            if (item.CustomerURI != null)
            {
                items[ExtendedProperty_CustomerURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.CustomerURI);
            }
            ;
            items[ExtendedProperty_CustomerID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.CustomerID);
            if (item.FormURI != null)
            {
                items[ExtendedProperty_FormURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.FormURI);
            }
            ;
            items[ExtendedProperty_FormID_Index]      = _DatabaseCommon.Utility.GuidToTuple(item.FormID);
            items[ExtendedProperty_Comments_Index]    = _DatabaseCommon.Utility.StringToTuple(item.Comments);
            items[ExtendedProperty_Date_Index]        = _DatabaseCommon.Utility.TimestampToTuple(item.Date);
            items[ExtendedProperty_InputsBytes_Index] = _DatabaseCommon.Utility.BinaryToTuple(item.InputsBytes);
            items[ExtendedProperty_OutputBytes_Index] = _DatabaseCommon.Utility.BinaryToTuple(item.OutputBytes);
            return(RecordTuple.From(items));
        }
Beispiel #4
0
        public static IPostgresTuple CreateRecordTupleFrom(global::UseCase1.FormGroup item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ColumnCount];

            if (useColumn[Property_ID_Index])
            {
                items[Property_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            }
            if (useColumn[Property_Name_Index])
            {
                items[Property_Name_Index] = _DatabaseCommon.Utility.StringToTuple(item.Name);
            }
            if (item.FormsURI != null)
            {
                if (useColumn[Property_FormsURI_Index])
                {
                    items[Property_FormsURI_Index] = ArrayTuple.Create(item.FormsURI, it => new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(it));
                }
            }
            ;
            return(RecordTuple.From(items));
        }
        public static IPostgresTuple CreateExtendedRecordTupleFrom(global::FormXYZ.Output item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_ID_Index])
            {
                items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            }
            if (item.SubmissionURI != null)
            {
                if (useColumn[ExtendedProperty_SubmissionURI_Index])
                {
                    items[ExtendedProperty_SubmissionURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.SubmissionURI);
                }
            }
            ;
            if (useColumn[ExtendedProperty_SubmissionID_Index])
            {
                items[ExtendedProperty_SubmissionID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.SubmissionID);
            }
            if (useColumn[ExtendedProperty_Rgflkj_Index])
            {
                items[ExtendedProperty_Rgflkj_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.Rgflkj);
            }
            if (useColumn[ExtendedProperty_XYZ_Index])
            {
                items[ExtendedProperty_XYZ_Index] = _DatabaseCommon.Utility.DecimalToTuple(item.XYZ);
            }
            return(RecordTuple.From(items));
        }
        public static IPostgresTuple CreateExtendedTupleFrom(global::UseCase1.Form item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            items[ExtendedProperty_ID_Index]     = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            items[ExtendedProperty_Name_Index]   = _DatabaseCommon.Utility.StringToTuple(item.Name);
            items[ExtendedProperty_Schema_Index] = _DatabaseCommon.Utility.StringToTuple(item.Schema);
            if (item.GroupURI != null)
            {
                items[ExtendedProperty_GroupURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.GroupURI);
            }
            ;
            items[ExtendedProperty_GroupID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.GroupID);
            items[ExtendedProperty_Status_Index]  = _DatabaseCommon.FactoryUseCase1_FormStatus.FormStatusConverter.CreateTupleFrom(item.Status);
            items[ExtendedProperty_Inputs_Index]  = ArrayTuple.Create(item.Inputs, _DatabaseCommon.FactoryUseCase1_Entry.EntryConverter.CreateExtendedTupleFrom);
            items[ExtendedProperty_Outputs_Index] = ArrayTuple.Create(item.Outputs, _DatabaseCommon.FactoryUseCase1_Entry.EntryConverter.CreateExtendedTupleFrom);
            if (item.SubmissionsURI != null)
            {
                items[ExtendedProperty_SubmissionsURI_Index] = ArrayTuple.Create(item.SubmissionsURI, it => new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(it));
            }
            ;
            return(RecordTuple.From(items));
        }
Beispiel #7
0
        public static IPostgresTuple CreateExtendedRecordTupleFrom(global::FormABC.Input item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_ID_Index])
            {
                items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            }
            if (item.SubmissionURI != null)
            {
                if (useColumn[ExtendedProperty_SubmissionURI_Index])
                {
                    items[ExtendedProperty_SubmissionURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.SubmissionURI);
                }
            }
            ;
            if (useColumn[ExtendedProperty_SubmissionID_Index])
            {
                items[ExtendedProperty_SubmissionID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.SubmissionID);
            }
            if (useColumn[ExtendedProperty_BirthYear_Index])
            {
                items[ExtendedProperty_BirthYear_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.BirthYear);
            }
            if (useColumn[ExtendedProperty_NumberOfCars_Index])
            {
                items[ExtendedProperty_NumberOfCars_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.NumberOfCars);
            }
            return(RecordTuple.From(items));
        }
Beispiel #8
0
        public static IPostgresTuple CreateExtendedRecordTupleFrom(global::UseCase1.SubmissionList item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_URI_Index])
            {
                items[ExtendedProperty_URI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.URI);
            }
            if (useColumn[ExtendedProperty_Customer_Index])
            {
                items[ExtendedProperty_Customer_Index] = _DatabaseCommon.Utility.StringToTuple(item.Customer);
            }
            if (useColumn[ExtendedProperty_Form_Index])
            {
                items[ExtendedProperty_Form_Index] = _DatabaseCommon.Utility.StringToTuple(item.Form);
            }
            if (useColumn[ExtendedProperty_Group_Index])
            {
                items[ExtendedProperty_Group_Index] = _DatabaseCommon.Utility.StringToTuple(item.Group);
            }
            if (useColumn[ExtendedProperty_Date_Index])
            {
                items[ExtendedProperty_Date_Index] = _DatabaseCommon.Utility.TimestampToTuple(item.Date);
            }
            return(RecordTuple.From(items));
        }
Beispiel #9
0
        public static IPostgresTuple CreateTupleFrom(global::Test.XYZ item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ColumnCount];

            items[Property_ID_Index]   = _DatabaseCommon.Utility.IntegerToTuple(item.ID);
            items[Property_From_Index] = _DatabaseCommon.Utility.StringToTuple(item.From);
            return(RecordTuple.From(items));
        }
Beispiel #10
0
        public static IPostgresTuple CreateTupleFrom(global::UseCase1.Entry item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ColumnCount];

            items[Property_Description_Index] = _DatabaseCommon.Utility.StringToTuple(item.Description);
            items[Property_ColumnName_Index]  = _DatabaseCommon.Utility.StringToTuple(item.ColumnName);
            items[Property_DataType_Index]    = _DatabaseCommon.FactoryUseCase1_DataType.DataTypeConverter.CreateTupleFrom(item.DataType);
            return(RecordTuple.From(items));
        }
        public static IPostgresTuple CreateRecordTupleFrom(global::UseCase1.Submission item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ColumnCount];

            if (useColumn[Property_ID_Index])
            {
                items[Property_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            }
            if (item.CustomerURI != null)
            {
                if (useColumn[Property_CustomerURI_Index])
                {
                    items[Property_CustomerURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.CustomerURI);
                }
            }
            ;
            if (useColumn[Property_CustomerID_Index])
            {
                items[Property_CustomerID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.CustomerID);
            }
            if (item.FormURI != null)
            {
                if (useColumn[Property_FormURI_Index])
                {
                    items[Property_FormURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.FormURI);
                }
            }
            ;
            if (useColumn[Property_FormID_Index])
            {
                items[Property_FormID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.FormID);
            }
            if (useColumn[Property_Comments_Index])
            {
                items[Property_Comments_Index] = _DatabaseCommon.Utility.StringToTuple(item.Comments);
            }
            if (useColumn[Property_Date_Index])
            {
                items[Property_Date_Index] = _DatabaseCommon.Utility.TimestampToTuple(item.Date);
            }
            return(RecordTuple.From(items));
        }
Beispiel #12
0
        public static IPostgresTuple CreateExtendedRecordTupleFrom(global::Test.XYZ item, bool[] useColumn)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            if (useColumn[ExtendedProperty_ID_Index])
            {
                items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.IntegerToTuple(item.ID);
            }
            if (useColumn[ExtendedProperty_From_Index])
            {
                items[ExtendedProperty_From_Index] = _DatabaseCommon.Utility.StringToTuple(item.From);
            }
            return(RecordTuple.From(items));
        }
Beispiel #13
0
        public static IPostgresTuple CreateExtendedTupleFrom(global::UseCase1.SelectedSubmission item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            items[ExtendedProperty_URI_Index]        = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.URI);
            items[ExtendedProperty_Customer_Index]   = _DatabaseCommon.Utility.StringToTuple(item.Customer);
            items[ExtendedProperty_Form_Index]       = _DatabaseCommon.Utility.StringToTuple(item.Form);
            items[ExtendedProperty_Schema_Index]     = _DatabaseCommon.Utility.StringToTuple(item.Schema);
            items[ExtendedProperty_FormInputs_Index] = ArrayTuple.Create(item.FormInputs, _DatabaseCommon.FactoryUseCase1_Entry.EntryConverter.CreateExtendedTupleFrom);
            items[ExtendedProperty_Group_Index]      = _DatabaseCommon.Utility.StringToTuple(item.Group);
            items[ExtendedProperty_Comments_Index]   = _DatabaseCommon.Utility.StringToTuple(item.Comments);
            items[ExtendedProperty_Date_Index]       = _DatabaseCommon.Utility.TimestampToTuple(item.Date);
            return(RecordTuple.From(items));
        }
        public static IPostgresTuple CreateExtendedTupleFrom(global::FormXYZ.Input item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            if (item.SubmissionURI != null)
            {
                items[ExtendedProperty_SubmissionURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.SubmissionURI);
            }
            ;
            items[ExtendedProperty_SubmissionID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.SubmissionID);
            items[ExtendedProperty_LastPurchase_Index] = _DatabaseCommon.Utility.TimestampToTuple(item.LastPurchase);
            items[ExtendedProperty_JKhdk_Index]        = _DatabaseCommon.Utility.StringToTuple(item.JKhdk);
            items[ExtendedProperty_Qjfs_Index]         = _DatabaseCommon.Utility.IntegerToTuple(item.Qjfs);
            return(RecordTuple.From(items));
        }
Beispiel #15
0
        public static IPostgresTuple CreateExtendedTupleFrom(global::FormABC.Output item)
        {
            if (item == null)
            {
                return(null);
            }
            var items = new IPostgresTuple[ExtendedColumnCount];

            items[ExtendedProperty_ID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.ID);
            if (item.SubmissionURI != null)
            {
                items[ExtendedProperty_SubmissionURI_Index] = new Revenj.DatabasePersistence.Postgres.Converters.ValueTuple(item.SubmissionURI);
            }
            ;
            items[ExtendedProperty_SubmissionID_Index] = _DatabaseCommon.Utility.GuidToTuple(item.SubmissionID);
            items[ExtendedProperty_ABC_Index]          = _DatabaseCommon.Utility.DecimalToTuple(item.ABC);
            items[ExtendedProperty_XYZ_Index]          = _DatabaseCommon.Utility.DecimalToTuple(item.XYZ);
            items[ExtendedProperty_HasQQQ_Index]       = _DatabaseCommon.Utility.BoolToTuple(item.HasQQQ);
            return(RecordTuple.From(items));
        }
Beispiel #16
0
 public static Stream CreateCopy(RecordTuple tuple)
 {
     return(tuple.Build(true, PostgresTuple.EscapeBulkCopy));
 }