MetaStore.undeclareForeignKey

bool undeclareForeignKey(gda.meta_struct.MetaStruct mstruct, string fkName, string catalog, string schema, string table, string refCatalog, string refSchema, string refTable)

Removes a declared foreign key from store.

This method begins a transaction if possible (ie. none is already started), and if it can't, then if there is an error, the job may be partially done.

A check is always performed to make sure all the database objects actually exist and returns an error if not. The check is performed using mstruct if it's not null (in this case only the tables already represented in mstruct will be considered, in other words: mstruct will not be modified), and using an internal #GdaMetaStruct is null.

See [gda.meta_store.MetaStore.declareForeignKey] for more information anout the catalog, schema, name, ref_catalog, ref_schema and ref_name arguments.

Parameters

mstructa #GdaMetaStruct, or null
fkNamethe name of the foreign key to declare
catalogthe catalog in which the table (for which the foreign key is for) is, or null
schemathe schema in which the table (for which the foreign key is for) is, or null
tablethe name of the table (for which the foreign key is for)
refCatalogthe catalog in which the referenced table is, or null
refSchemathe schema in which the referenced table is, or null
refTablethe name of the referenced table

Returns

true if no error occurred

Throws

[MetaStoreException]