val connect :
string -> string -> string -> string -> int -> int
Mysql.connect host user password database tcp_port unix_socketreturns an identifier for this connection that should be passed on to all the operations on this connection. Empty values or zeros given to parameters indicate default behaviour.
val query :
int -> string -> int * int
connectionis used for this
queryand the result is a tuple with the number to be used to read the records and the number of affected records by the query
val record :
int -> (string * string) list
query-idinside a set of pairs (fieldname, value), an empty list marks the end of the table or empty results
val close :
int -> unit
val scan :
string -> string * string list
queryfor expressions between question marks and creates a tuple with the expression to build the query and the list of field names of the resulting records.
To be compatible to the future use of prepared queries (MySQL 4.1 and later) the question mark expressions can only replace normal contants in the query. The prepared statements will be available when MySQL 4.1 becomes the normal stable MySQL soon.
insert into table address (name, address, job) value (?name?, ?address?, ?job?)
select 'dear '+name as opening, address where job like ?job_filter?
val finish :
unit -> unit
val enum :
int -> string -> string -> string
enum connection table field