Gda.MetaContext¶
Fields¶
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
column_names  | 
[  | 
r/w  | 
an array of column names (columns of the table_name table)  | 
column_values  | 
r/w  | 
an array of values, one for each column named in column_names  | 
|
columns  | 
{  | 
r/w  | 
A   | 
size  | 
r/w  | 
the size of the column_names and column_values arrays  | 
|
table_name  | 
r/w  | 
the name of the table in the   | 
Methods¶
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Details¶
- class Gda.MetaContext¶
 The
Gda.MetaContextrepresents a meta data modification context: the how when used withGda.MetaStore.modify_with_context(), and the what when used withGda.Connection.update_meta_store().To create a new
Gda.MetaContextuseGda.MetaContext.new.To add a new column/value pair use #gda_meta_context_add_column.
To free a
Gda.MetaContext, created byGda.MetaContext.new, useGda.AttributesManager.free.Since 5.2, you must consider this struct as opaque. Any access to its internal must use public API. Don’t try to use
Gda.MetaContext.freeon a struct that was created manually.- classmethod new()¶
 - Returns:
 a new
Gda.MetaContextstruct with a new created hash to store column name/value pairs.- Return type:
 
Creates a new
Gda.MetaContextstruct with aGLib.HashTableto store column/value pairs.New in version 5.2.
- copy()¶
 - Returns:
 a new
Gda.MetaContext- Return type:
 
Copy constructor.
New in version 5.2.
- free()¶
 Frees any resources taken by self struct. If self is
None, then nothing happens.New in version 5.2.
- get_table()¶
 - Returns:
 A string with the table’s name used in the context.
- Return type:
 
Get table’s name to used in the context.
New in version 5.2.
- set_column(column, value, cnc)¶
 - Parameters:
 column (
str) – the column’s namevalue (
GObject.Value) – the column’s valuecnc (
Gda.ConnectionorNone) – aGda.Connectionto be used when identifier are normalized, orNone
Sets a new column/value pair to the given context self. Column, must be a column in the given table’s name setted by
Gda.MetaContext.set_table() (a table in the ‘database schema [information_schema]’). If the given column already exists it’s value is overwrited.Column’s name and value is copied and destroyed when
Gda.MetaContext.freeis called.New in version 5.2.
- set_columns(columns, cnc)¶
 - Parameters:
 columns ({
str:GObject.Value}) – aGLib.HashTablewith the table’s columns’ name and their values to use in context.cnc (
Gda.ConnectionorNone) – aGda.Connectionto used to normalize identifiers quoting, orNone
Set columns to use in the context. The
GLib.HashTableuse column’s name as key and aGObject.Valueas value, to represent its value.columns incements its reference counting. Is recommended to use
Gda.MetaContext.freein order to free them.New in version 5.2.
- set_table(table)¶
 - Parameters:
 table (
str) – a string with the table’s name to use in context
Set table’s name to use in the context. The table is one of ‘database schema [information_schema]’ used to store meta information about the database. Use “_tables” to update meta information about database’s tables.
New in version 5.2.