Gda.Connection – Gda-6.0 – Vala Binding Reference

Gda.Connection – Gda-6.0 Reference Manual

# Connection

## Object Hierarchy:

## Description:

[ CCode ( type_id = "gda_connection_get_type ()" ) ]
public class Connection : Object, Lockable
Namespace: Gda
Package: Gda-6.0

## Content:

### Properties:

- public string auth_string { owned get; set; }
- public string cnc_string { owned get; set; }
- public string dsn { owned get; set; }
- public int events_history_size { get; set; }
- public uint execution_slowdown { get; set; }
- public bool execution_timer { get; set; }
- public MetaStore meta_store { owned get; set; }
- public ServerProvider provider { owned get; set; }

### Static methods:

- public static Quark error_quark ()
- public static unowned Worker internal_get_worker (ServerProviderConnectionData? data)
- public static Connection open_from_dsn (DsnInfo dsn, string? auth_string, ConnectionOptions options) throws Error
- public static Connection open_from_dsn_name (string dsn_name, string? auth_string, ConnectionOptions options) throws Error
- public static Connection open_from_string (string? provider_name, string cnc_string, string? auth_string, ConnectionOptions options) throws Error
- public static Connection open_sqlite (string? directory, string filename, bool auto_unlink)
- public static void string_split (string string, out string out_cnc_params, out string out_provider, out string out_username, out string out_password)

### Creation methods:

- protected Connection ()
- public Connection.from_dsn (DsnInfo dsn, string? auth_string, ConnectionOptions options) throws Error
- public Connection.from_dsn_name (string dsn_name, string? auth_string, ConnectionOptions options) throws Error
- public Connection.from_string (string? provider_name, string cnc_string, string? auth_string, ConnectionOptions options) throws Error

### Methods:

- public void add_event (owned ConnectionEvent event)
- public void add_prepared_statement (Statement gda_stmt, PStmt prepared_stmt)
- public bool add_savepoint (string? name) throws Error
- public SList<Object> batch_execute (Batch batch, Set? @params, StatementModelUsage model_usage) throws Error
- public bool begin_transaction (string? name, TransactionIsolation level) throws Error
- public void clear_events_list ()
- public bool close () throws Error
- public bool commit_transaction (string? name) throws Error
- public DbCatalog create_db_catalog ()
- public ServerOperation create_operation (ServerOperationType type, Set? options) throws Error
- public SqlParser create_parser ()
- public void del_prepared_statement (Statement gda_stmt)
- public bool delete_row_from_table (string table, string condition_column_name, Value condition_value) throws Error
- public bool delete_savepoint (string? name) throws Error
- public int execute_non_select_command (string sql) throws Error
- public DataModel execute_select_command (string sql) throws Error
- public unowned string get_authentication ()
- public unowned string get_cnc_string ()
- public bool get_date_format (out DateDMY? out_first, out DateDMY? out_second, out DateDMY? out_third, out string? out_sep) throws Error
- public unowned string get_dsn ()
- public unowned List<ConnectionEvent> get_events ()
- public unowned MainContext get_main_context (Thread? thread)
- public unowned MetaStore get_meta_store ()
- public DataModel get_meta_store_data_v (ConnectionMetaType meta_type, List<Holder> filters) throws Error
- public ConnectionOptions get_options ()
- public unowned PStmt get_prepared_statement (Statement gda_stmt)
- public unowned ServerProvider get_provider ()
- public unowned string get_provider_name ()
- public ConnectionStatus get_status ()
- public unowned TransactionStatus get_transaction_status ()
- public bool insert_row_into_table_v (string table, SList<string> col_names, SList<Value?> values) throws Error
- public void internal_change_transaction_state (TransactionStatusState newstate)
- public ServerProviderConnectionData? internal_get_provider_data_error () throws Error
- public void internal_reset_transaction_status ()
- public void internal_savepoint_added (string? parent_trans, string svp_name)
- public void internal_savepoint_removed (string? svp_name)
- public void internal_savepoint_rolledback (string? svp_name)
- public void internal_set_provider_data (ServerProviderConnectionData data, DestroyNotify destroy_func)
- public void internal_statement_executed (Statement stmt, Set? @params, ConnectionEvent error)
- public void internal_transaction_committed (string? trans_name)
- public void internal_transaction_rolledback (string? trans_name)
- public void internal_transaction_started (string? parent_trans, string trans_name, TransactionIsolation isol_level)
- public bool is_opened ()
- public bool open () throws Error
- public uint open_async (ConnectionOpenFunc callback) throws Error
- public string? operation_get_sql_identifier_at_path (ServerOperation op, string path) throws Error
- public Statement parse_sql_string (string sql, out Set? @params = null) throws Error
- public bool perform_operation (ServerOperation op) throws Error
- public ConnectionEvent point_available_event (ConnectionEventType type)
- public ServerOperation? prepare_operation_create_table (string table_name, List<ServerOperationCreateTableArg> arguments) throws Error
- public ServerOperation? prepare_operation_drop_table (string table_name) throws Error
- public string quote_sql_identifier (string id)
- public SList<Object> repetitive_statement_execute (RepetitiveStatement rstmt, StatementModelUsage model_usage, Type[]? col_types, bool stop_on_error) throws Error
- public bool rollback_savepoint (string? name) throws Error
- public bool rollback_transaction (string? name) throws Error
- public void set_main_context (Thread? thread, MainContext? context)
- public Object statement_execute (Statement stmt, Set? @params, StatementModelUsage model_usage, out Set? last_insert_row = null) throws Error
- public int statement_execute_non_select (Statement stmt, Set? @params = null, out Set? last_insert_row = null) throws Error
- public DataModel statement_execute_select (Statement stmt, Set? @params = null) throws Error
- public DataModel statement_execute_select_full (Statement stmt, Set? @params, StatementModelUsage model_usage, Type[]? col_types = null) throws Error
- public bool statement_prepare (Statement stmt) throws Error
- public string statement_to_sql (Statement stmt, Set? @params, StatementSqlFlag flags, out SList<unowned Holder>? params_used) throws Error
- public bool supports_feature (ConnectionFeature feature)
- public bool update_meta_store (MetaContext? context) throws Error
- public bool update_row_in_table_v (string table, string condition_column_name, Value condition_value, SList<string> col_names, SList<Value?> values) throws Error
- public string value_to_sql_string (Value from)

### Signals:

- public virtual signal void closed ()
- public virtual signal void dsn_changed ()
- public virtual signal void error (ConnectionEvent error)
- public virtual signal void opened ()
- public virtual signal void status_changed (ConnectionStatus status)
- public virtual signal void transaction_status_changed ()

### Inherited Members:

All known members inherited from class GLib.Object

- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data

- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer

- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref

All known members inherited from interface Gda.Lockable

- @lock

- @unlock

- trylock