MetaStore.schemaAddCustomObject

bool schemaAddCustomObject(string xmlDescription)

The internal database used by store can be 'augmented' with some user-defined database objects (such as tables or views). This method allows one to add a new database object.

If the internal database already contains the object, then: <itemizedlist> <listitem><para>if the object is equal to the provided description then TRUE is returned</para></listitem> <listitem><para>if the object exists but differs from the provided description, then FALSE is returned, with the GDA_META_STORE_SCHEMA_OBJECT_CONFLICT_ERROR error code</para></listitem> </itemizedlist>

The xml_description defines the table of view's definition, for example: <programlisting><! <column name="id" pkey="TRUE"/> <column name="value"/> ">CDATA[

<column name="id" pkey="TRUE"/> <column name="value"/>
]></programlisting>

The partial DTD for this XML description of the object to add is the following (the top node must be a <table> or a <view>): <programlisting><!

Parameters

xmlDescriptionan XML description of the table or view to add to store

Returns

TRUE if the new object has successfully been added

Throws