Gjsify LogoGjsify Logo

The GdaMetaContext represents a meta data modification context: the how when used with gda_meta_store_modify_with_context(), and the what when used with gda_connection_update_meta_store().

To create a new #GdaMetaContext use #gda_meta_context_new.

To add a new column/value pair use #gda_meta_context_add_column.

To free a #GdaMetaContext, created by #gda_meta_context_new, use #gda_attributes_manager_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_meta_context_free on a struct that was created manually.

record

Hierarchy

  • MetaContext

Index

Constructors

Properties

column_names: string[]

an array of column names (columns of the table_name table)

field
column_values: any[]

an array of values, one for each column named in column_names

field
columns: HashTable<string | number | symbol, string | number | boolean>

A #GHashTable storing columns' name as key and #GValue as column's value.

field
size: number

the size of the column_names and column_values arrays

field
table_name: string

the name of the table in the GdaMetaStore's internal database

field
name: string

Methods

  • free(): void
  • get_n_columns(): number
  • get_table(): string
  • set_column(column: string, value: any, cnc: Gda.Connection): void
  • Sets a new column/value pair to the given context ctx. Column, must be a column in the given table's name setted by #gda_meta_context_set_table () (a table in the database schema). If the given column already exists it's value is overwrited.

    Column's name and value is copied and destroyed when #gda_meta_context_free is called.

    Parameters

    • column: string

      the column's name

    • value: any

      the column's value

    • cnc: Gda.Connection

      a #GdaConnection to be used when identifier are normalized, or NULL

    Returns void

  • set_columns(columns: HashTable<string | number | symbol, string | number | boolean>, cnc: Gda.Connection): void
  • Set columns to use in the context. The #GHashTable use column's name as key and a #GValue as value, to represent its value.

    columns incements its reference counting. Is recommended to use #gda_meta_context_free in order to free them.

    Parameters

    • columns: HashTable<string | number | symbol, string | number | boolean>

      a #GHashTable with the table's columns' name and their values to use in context.

    • cnc: Gda.Connection

      a #GdaConnection to used to normalize identifiers quoting, or NULL

    Returns void

  • set_table(table: string): void
  • Set table's name to use in the context. The table is one of database schema used to store meta information about the database. Use "_tables" to update meta information about database's tables.

    Parameters

    • table: string

      a string with the table's name to use in context

    Returns void

  • stringify(): string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method