Beispiel #1
0
        public cDBMetadata_Table_Search(
            iClaSSe aggregateloopback_ref_in,
            cDBMetadata_Table_Searches parent_ref_,
            string name_in
            ) : base(
                aggregateloopback_ref_in
                )
        {
            parent_ref = parent_ref_;

            //#region ClaSSe...
            Name    = name_in;
            isRange = false;
            isExplicitUniqueIndex = false;
            //---
            searchparameters_ = new cDBMetadata_Field_refs(
                this,
                this.Parent_ref.Parent_ref.Parent_ref
                );
            updates_ = new cDBMetadata_Updates(
                this,
                /*this*/ this.Parent_ref.Parent_ref.Parent_ref
                );
            //#endregion
        }
		public cDBMetadata_Table(
			iClaSSe aggregateloopback_ref_in, 
			iDBMetadata_Tables parent_ref_in, 
			string name_in
		) : base (
			aggregateloopback_ref_in
		) {
			parent_ref_ = parent_ref_in;

			//#region ClaSSe...
			Name = name_in;
			FriendlyName = string.Empty;
			DBDescription = string.Empty;
			ExtendedDescription = string.Empty;
			isVirtualTable = false;
			isConfig = false;
			//---
			dbs_ = new cDBMetadata_Table_DBs(this, this);
			fields_ = new cDBMetadata_Table_Fields(this, this);
			searches_ = new cDBMetadata_Table_Searches(this, this);
			updates_ = new cDBMetadata_Updates(this, this.Parent_ref);
			//#endregion

			fields_onlypk_ = new cDBMetadata_Table_Fields_PK(this, true);
			fields_nopk_ = new cDBMetadata_Table_Fields_PK(this, false);
			fields_onlyfk_ = new cDBMetadata_Table_Fields_FK(this, true);
			fields_nofk_ = new cDBMetadata_Table_Fields_FK(this, false);
		}
Beispiel #3
0
        public cDBMetadata_Table(
            iClaSSe aggregateloopback_ref_in,
            iDBMetadata_Tables parent_ref_in,
            string name_in
            ) : base(
                aggregateloopback_ref_in
                )
        {
            parent_ref_ = parent_ref_in;

            //#region ClaSSe...
            Name                = name_in;
            FriendlyName        = string.Empty;
            DBDescription       = string.Empty;
            ExtendedDescription = string.Empty;
            isVirtualTable      = false;
            isConfig            = false;
            //---
            dbs_      = new cDBMetadata_Table_DBs(this, this);
            fields_   = new cDBMetadata_Table_Fields(this, this);
            searches_ = new cDBMetadata_Table_Searches(this, this);
            updates_  = new cDBMetadata_Updates(this, this.Parent_ref);
            //#endregion

            fields_onlypk_ = new cDBMetadata_Table_Fields_PK(this, true);
            fields_nopk_   = new cDBMetadata_Table_Fields_PK(this, false);
            fields_onlyfk_ = new cDBMetadata_Table_Fields_FK(this, true);
            fields_nofk_   = new cDBMetadata_Table_Fields_FK(this, false);
        }
		public cDBMetadata_Update(
			iClaSSe aggregateloopback_ref_in, 
			cDBMetadata_Updates parent_ref_in, 
			string name_in
		) : base (
			aggregateloopback_ref_in
		) {
			parent_ref_ = parent_ref_in;

			//#region ClaSSe...
			Name = name_in;
			//---
			updateparameters_ = new cDBMetadata_Field_refs(
				this, 
				parent_ref_.Parent_ref
			);
			//#endregion
		}
Beispiel #5
0
        public cDBMetadata_Update(
            iClaSSe aggregateloopback_ref_in,
            cDBMetadata_Updates parent_ref_in,
            string name_in
            ) : base(
                aggregateloopback_ref_in
                )
        {
            parent_ref_ = parent_ref_in;

            //#region ClaSSe...
            Name = name_in;
            //---
            updateparameters_ = new cDBMetadata_Field_refs(
                this,
                parent_ref_.Parent_ref
                );
            //#endregion
        }
Beispiel #6
0
        public void CopyFrom(cDBMetadata_Updates updates_in)
        {
            int _table;
            int _field;
            int _updateparameter;

            for (int u = 0; u < updates_in.Count; u++)
            {
                int _update = this.Add(
                    updates_in[u].Name,
                    false
                    );
                for (int f = 0; f < updates_in[u].UpdateParameters.Count; f++)
                {
                    _table = parent_ref_.Search(
                        updates_in[u].UpdateParameters[f].TableName
                        );
                    if (_table == -1)
                    {
                        throw new Exception();                                   // ToDos: here!
                    }
                    _field = parent_ref_[_table].Fields.Search(
                        updates_in[u].UpdateParameters[f].FieldName
                        );
                    if (_field == -1)
                    {
                        throw new Exception();                                   // ToDos: here!
                    }
                    _updateparameter
                        = this[_update].UpdateParameters.Add(
                              _table,
                              _field,
                              true
                              );

                    this[_update].UpdateParameters[_updateparameter].ParamName
                        = updates_in[u].UpdateParameters[f].ParamName;
                }
            }
        }
		public cDBMetadata_Table_Search(
			iClaSSe aggregateloopback_ref_in, 
			cDBMetadata_Table_Searches parent_ref_, 
			string name_in
		) : base (
			aggregateloopback_ref_in
		) {
			parent_ref = parent_ref_;

			//#region ClaSSe...
			Name = name_in;
			isRange = false;
			isExplicitUniqueIndex = false;
			//---
			searchparameters_ = new cDBMetadata_Field_refs(
				this, 
				this.Parent_ref.Parent_ref.Parent_ref
			);
			updates_ = new cDBMetadata_Updates(
				this, 
				/*this*/this.Parent_ref.Parent_ref.Parent_ref
			);
			//#endregion
		}
Beispiel #8
0
		public void CopyFrom(cDBMetadata_Updates updates_in) {
			int _table;
			int _field;
			int _updateparameter;

			for (int u = 0; u < updates_in.Count; u++) {
				int _update = this.Add(
					updates_in[u].Name,
					false
				);
				for (int f = 0; f < updates_in[u].UpdateParameters.Count; f++) {
					_table = parent_ref_.Search(
						updates_in[u].UpdateParameters[f].TableName
					);
					if (_table == -1) throw new Exception(); // ToDos: here!

					_field = parent_ref_[_table].Fields.Search(
						updates_in[u].UpdateParameters[f].FieldName
					);
					if (_field == -1) throw new Exception(); // ToDos: here!

					_updateparameter 
						= this[_update].UpdateParameters.Add(
							_table,
							_field,
							true
						);

					this[_update].UpdateParameters[_updateparameter].ParamName 
						= updates_in[u].UpdateParameters[f].ParamName;
				}
			}
		}