Connection
Object Hierarchy:
Description:
An interface representing a database engine connection.
Core functionality are provided. Features provided by database engines will be exposed by the object implementing this interface or by future interfaces.
Namespace: Vda
Package: vda-1
Content:
Enums:
- Status - Status of the connection
Properties:
- public abstract string connection_string { get; }
A string representation of all connection parameters
- public abstract bool is_opened { get; }
Check if the database is opened or not.
- public abstract ConnectionParameters parameters { get; set; }
Set of connection parameters used with the database engine
- public abstract Status status { get; }
Connection to database engine status as Status
Methods:
- public abstract async void close () throws Error
Should throw canceled event at connection closed.
- public abstract PreparedQuery? get_prepared_query (string name)
Finds a saved PreparedQuery
- public virtual string locale (string category)
Extract information about connection's locale settings.
- public abstract async Status open () throws Error
Start a connection to a database. Initialy will return Status.IN_PROGRESS if the connection has been started. Returns Status.CANCELED if the connection can't be started.
- public abstract async Status open_from_string (string cnc_string) throws Error
Open a connection to a database engine using a string with all required parameters.
- public abstract Query parse_string (string sql) throws Error
Parse a string and return a Query to execute it as an SQL command
- public abstract PreparedQuery? parse_string_prepared (string? name, string sql) throws Error
String to parse contains parameters to construct the final SQL command to execute. The query is saved using the given name and retrieved by get_prepared_query
- public abstract PreparedQuery? query_from_command (SqlCommand cmd, string? name) throws Error
Creates a Query from a SqlCommand
- public virtual string value_to_quoted_string (SqlValue v)
Quotes a string representation of a give value, as expected by the connection.
Signals:
- public signal void canceled (string message)
Signal emited when the connection has been canceled
- public signal void closed ()
Signal emited when the connection has been closed
- public signal void closing ()
Signal emited when the connection start a process of closing
- public signal void disconnected ()
Thrown if the connection to the server is not available any.
- public signal void opened ()
Signal emited when the connection has been stablished
- public signal void timeout ()
Signal emited when the connection has been canceled due to a timeout
Inherited Members:
All known members inherited from class GLib.Object