module Dbf_old: sig .. end
Types to describe an old DBForge schema.
type t_key =
Type of keys.
type sql_code = string
SQL code is a string.
type dbms =
| |
Odbc |
| |
Mysql |
| |
Postgres |
The various supported DBMS.
type column_dbms = {
|
mutable col_type_sql : string * string option * string option; |
|
mutable col_2ml : string; |
|
mutable col_ml2 : string; |
|
mutable col_key : t_key option; |
|
mutable col_default : sql_code option; |
|
mutable col_atts : (string * sql_code) list; |
}
Column info for a specific dbms.
type column = {
|
mutable col_name : string; |
|
mutable col_comment : string; |
|
mutable col_type_ml : string; |
|
mutable col_nullable : bool; |
|
mutable col_index : bool; |
|
mutable col_dbms : (dbms * column_dbms) list; |
}
A table column.
type table = {
|
mutable ta_name : string; |
|
mutable ta_comment : string; |
|
mutable ta_columns : column list; |
|
mutable ta_atts : int list; |
|
mutable ta_indexes : int list; |
|
mutable ta_logged : bool; |
}
A table.
type schema = {
|
mutable sch_tables : table list; |
}
A schema.
Reading old DBForge files
val fail : Xml.xml -> string -> 'a
val bool_of_xml : Xml.xml -> bool
val unescape : string -> string
val db_of_xml : Xml.xml -> dbms
val key_of_xml : Xml.xml -> t_key
val opt_of_xml : (Xml.xml -> 'a) -> Xml.xml -> 'a option
val att_of_xml : Xml.xml -> string * string
val string_of_xml : Xml.xml -> string
val type_sql_of_xml : Xml.xml list -> string * string option * string option
val coldbms_of_xml : Xml.xml -> column_dbms
val dbms_of_xml : Xml.xml -> dbms * column_dbms
val column_of_xml : Xml.xml -> column
val table_of_xml : Xml.xml -> table
val schema_of_xml : Xml.xml -> schema
val read : string -> schema
Converting old to new format
val string_of_dbms : dbms -> string
val regular_type_of_old_sql_type : string * string option * 'a -> Dbf_sql.SQL_db.ty option
val sqltype_of_col : dbms ->
column_dbms -> Dbf_sql.SQL_db.ty * string Dbf_misc.StringMap.t
val convert_column : Dbf_sql.SQL_db.table -> dbms -> column -> unit
val convert_table : Dbf_sql.SQL_db.db -> dbms -> table -> unit
val convert_to_db : schema -> dbms -> Dbf_sql.SQL_db.db