Commit afde0b23 authored by gerd's avatar gerd

docs


git-svn-id: https://gps.dynxs.de/private/svn/app-plasma/trunk@232 55289a75-7b90-4627-9e07-ffb4263930b2
parent c91eab41
......@@ -10,12 +10,37 @@ object
method db_dbname : string option
method db_user : string option
method db_password : string option
method db_ro_connections_max : int
end
val extract_db_config : Netplex_types.config_file -> db_config
(** Extracts the [db_config] from this Netplex config file:
{[
netplex {
...
database {
dbname = "<name of database>"; (* required *)
host = "<hostname>";
hostaddr = "<ipaddr>";
port = <port>;
user = "<user name>";
password = "<password>";
ro_connections_max = <c>;
};
...
}
]}
class type async_connection =
See the documentation of PostgreSQL for [dbname], [host], [hostaddr],
[port], [user], and [password] (but it should be obvious).
[ro_connections_max] is the number of db connections dedicated for
read-only database accesses. Defaults to 20.
*)
class type ['mode] async_connection =
object
inherit Postgresql.connection
......@@ -28,13 +53,30 @@ object
method next : bool -> unit
(** If there is a delayed continuation execute it now *)
method idle : bool
(** whether nothing is being executed *)
end
class connect : db_config -> async_connection
type read_write = [`R|`W]
(** the [mode] that is conventionally used for read-write connections *)
type read_only = [`R]
(** the [mode] that is conventionally used for read-only connections *)
type rw_async_connection = read_write async_connection
(** abbrev *)
type ro_async_connection = read_only async_connection
(** abbrev *)
class ['mode] connect : db_config -> ['mode] async_connection
(** Right now, we only have a sync connect *)
class async_exec : async_connection ->
class async_exec : 'mode async_connection ->
Unixqueue.event_system ->
?expect : Postgresql.result_status list ->
?params : string array ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment