get_view


Description:

[ Version ( since = "6.0" ) ]
public unowned DbView get_view (string catalog, string schema, string name)

Convenient function to get a view based on name.

The coller is responsible for calling parse_cnc before calling this function. This code is equivalent to the following code:

 GdaDbBase *iobj;
GList *it;

GdaDbCatalogPrivate *priv = gda_db_catalog_get_instance_private (self);

if (gda_db_catalog_parse_cnc (self, error))
return NULL;

iobj = gda_db_base_new ();
gda_db_base_set_names (iobj, catalog, schema, name);

for (it = priv->mp_views; it; it = it->next)
{
if (!gda_db_base_compare (iobj, GDA_DB_BASE (it->data)))
{
if (iobj)
g_object_unref (iobj);

return GDA_DB_VIEW (it->data);
}
}

if (iobj)
g_object_unref (iobj);

return NULL;

Parameters:

this

a DbCatalog object

catalog

a catalog name or null

schema

a schema name or null

name

view name. Can't be null

Returns:

View as DbView or null if the view is not found. The returned pointer should not be freed and belongs to this




2022 vala-language.org