GObject.Object
Midgard.Connection
Import line: | Midgard = imports.gi.Midgard; |
GIR File: | Midgard-10.05.gir |
C documentation: | MidgardConnection |
Class : | Connection |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
err : Object
read only
|
Midgard.Connection | |
errnum : Number
read only
|
Midgard.Connection | |
errstr : String
read only
|
Midgard.Connection | |
parent : GObject.Object
read only
|
Midgard.Connection | |
priv : Midgard.ConnectionPrivate
read only
|
Midgard.Connection |
Method / Constructor | Defined By | |
---|---|---|
new Midgard.Connection
(Object properties)
Create a new Midgard.Connection
Create a new Midgard.Connection
|
||
Midgard.Connection | ||
copy
()
:
Midgard.Connection
This function duplicates given MidgardConnection.
This function duplicates given MidgardConnection. It doesn't make deep copy. All persistant data are kept unchanged, but runtime related members are reset to default state. This function is helpful if application is forking and new processes might have different environment variables. Call g_object_unref if returned object is no longer needed.
|
Midgard.Connection | |
enable_dbus
(Boolean toggle)
:
none
Enable or disable dbus messages send for basic operation
Enable or disable dbus messages send for basic operation
|
Midgard.Connection | |
enable_quota
(Boolean toggle)
:
none
Enable or disable quota table usage.
Enable or disable quota table usage. If enabled, every base operation (create, update, delete) will be recorded in quota table, limiting particular types usage.
|
Midgard.Connection | |
enable_replication
(Boolean toggle)
:
none
Enable or disable repligard table usage.
Enable or disable repligard table usage. If enabled, every base operation (create, update, delete) will be recorded in repligard table.
|
Midgard.Connection | |
get_error
()
:
Number
Error id may be one of set by midgard_error.
Error id may be one of set by midgard_error.
|
Midgard.Connection | |
get_error_string
()
:
String
Error string may be one set by midgard_error.
Error string may be one set by midgard_error.
|
Midgard.Connection | |
get_loghandler
()
:
Number
MidgardConnection's loglevel currently set.
MidgardConnection's loglevel currently set.
|
Midgard.Connection | |
get_loglevel
()
:
Number
|
Midgard.Connection | |
get_user
()
:
Midgard.User
NULL is explicitly returned if there's no midgard_user logged in for the given MidgardConnection.
NULL is explicitly returned if there's no midgard_user logged in for the given MidgardConnection. See also MidgardUser methods if you need midgard_person associated with user.
|
Midgard.Connection | |
is_connected
()
:
Boolean
|
Midgard.Connection | |
is_enabled_dbus
()
:
Boolean
|
Midgard.Connection | |
is_enabled_quota
()
:
Boolean
|
Midgard.Connection | |
is_enabled_replication
()
:
Boolean
|
Midgard.Connection | |
Midgard.Connection | ||
Opens a connection to the database, which is defined in named configuration.
Opens a connection to the database, which is defined in named configuration. The configuration file is read from the system configuration directory directory is taken into account if library is compiled with `/usr' prefix, `/usr/local/etc` if compiled with `/usr/local` prefix, etc. Consider using midgard_connection_open_config(), if you need to open connection to database which is configured in user's home directory. If the named database configuration can not be read or the connection fails, then FALSE is returned and an error message is written to the global midgard error state. It also initializes MidgardSchema object (which is encapsulated by implementation ) and register all MgdSchema, MidgardObjectClass derived classes defined by user. This happens only when basic Midgard classes are not registered in GType system. This is recommended way to initialize MgdSchema types.
|
Midgard.Connection | |
Opens a MidgardConnection with the given configuration.
Opens a MidgardConnection with the given configuration. Take a look at midgard_connection_open() wrt MidgardSchema. If MidgardConnection is already associated with given config, method returns TRUE. If associated with another one, FALSE is returned and MGD_ERR_INTERNAL error is set.
|
Midgard.Connection | |
Midgard.Connection | ||
reopen
()
:
Boolean
This is MySQL optimized workaround for lost connection event.
This is MySQL optimized workaround for lost connection event.
|
Midgard.Connection | |
set_error
(Number errcode)
:
none
Valid errcode is one defined in MgdErrorGeneric.
Valid errcode is one defined in MgdErrorGeneric.
|
Midgard.Connection | |
set_loghandler
(Number loghandler)
:
none
Sets internal loghandler id associated with G_LOG_DOMAIN and loglevel.
Sets internal loghandler id associated with G_LOG_DOMAIN and loglevel. Caller is responsible to remove loghandler using g_log_remove_handler when new loglevel for G_LOG_DOMAIN is set.
|
Midgard.Connection | |
Sets log level of the given MidgardConnection.
Sets log level of the given MidgardConnection. Overwrites internal MidgardConnection's log level defined in configuration file. By default MidgardConnection holds loglevel which is associated with ( and duplicated from ) MidgardConfig. MidgardConfig object's log level isn't changed by this function This method is a shortcut which sets correctly loghandler,loglevel d GLib's log function. Default log function will be used if NULL is defined. Core's default function is midgard_error_default_log. warn is default loglevel, SQL queries are logged with debug level. With info level, function names ( and classes' names ) are ( at least should be) logged in language bindings
|
Midgard.Connection |
Event | Defined By | |
---|---|---|
auth_changed (Connection self)
:
none
|
Midgard.Connection | |
connected (Connection self)
:
none
|
Midgard.Connection | |
disconnected (Connection self)
:
none
|
Midgard.Connection | |
error (Connection self)
:
none
|
Midgard.Connection | |
lost_provider (Connection self)
:
none
|
Midgard.Connection |
Class / Namespace | Method / Signal / Properties |
---|---|
Midgard
Method |
|
Midgard
Method |
|
Midgard
Method |
|
Midgard
Method |
|
Midgard
Method |
|
Midgard.Collector
Method |
new Midgard.Collector.c_new
(Connection mgd, String typename, String domain, Value value)
:
Midgard.Collector
Create a new Midgard.Collector
|
Midgard.Object
Method |
Create a new Midgard.Object
|
Midgard.Object
Method |
set_connection
(Connection mgd)
:
none
|
Midgard.Object
Method |
get_connection
()
:
Midgard.Connection
Returned MidgardConnection is owned by core, and should not be freed.
|
Midgard.QueryBuilder
Method |
Create a new Midgard.QueryBuilder
|
Midgard.QueryExecutor
Method |
Create a new Midgard.QueryExecutor
|
Midgard.QuerySelect
Method |
Create a new Midgard.QuerySelect
|
Midgard.Replicator
Method |
Midgard.Replicator.export_purged
(Connection mgd, String classname, String startdate, String enddate)
:
String
Exports all purged objects of given class.
|
Midgard.Replicator
Method |
Marks object's storage record as exported.
|
Midgard.Replicator
Method |
|
Midgard.Replicator
Method |
This method tries to import all objects which could be unserialized from gievn xml.
|
Midgard.SchemaObjectFactory
Method |
Creates new instance of the class defined in Midgard Schema.
|
Midgard.SchemaObjectFactory
Method |
Midgard.SchemaObjectFactory.get_object_by_path
(Connection mgd, String classname, String path)
:
Midgard.Object
Get object by path.
|
Midgard.SchemaObjectFactory
Method |
Cases to return FALSE:
|
Midgard.Storage
Method |
Creates storage for base Midgard classes.
|
Midgard.Storage
Method |
Creates underlying storage (e.g.
|
Midgard.Storage
Method |
Update underlying storage.
|
Midgard.Storage
Method |
Checks whether storage for given class exists.
|
Midgard.Storage
Method |
Delete storage for given class.
|
Midgard.Transaction
Method |
Create a new Midgard.Transaction
|
Midgard.User
Method |
Create a new Midgard.User
|
Midgard.User
Method |
Fetch MidgardUser object from storage.
|
Midgard.User
Method |
|
Midgard.User
Method |
|
Midgard.dbus
Method |
Create a new Midgard.dbus
|
Midgard.dbus
Method |
Emits 'Notified' signal on objects at given path and sends given message.
|