12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667(* Copyright (C) 2017 Petter A. Urkedal <paurkedal@gmail.com>
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at your
* option) any later version, with the OCaml static compilation exception.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*)typedialect_tag=[`Mysql|`Pgsql|`Sqlite|`Other]typesql_dialect_tag=[`Mysql|`Pgsql|`Sqlite]typeparameter_style=[`None|`Linearofstring|`Indexedof(int->string)]typet={index:int;uri_scheme:string;dialect_tag:dialect_tag;parameter_style:parameter_style;describe_has_typed_params:bool;describe_has_typed_fields:bool;can_transact:bool;can_pool:bool;can_concur:bool;}letnext_backend_index=ref0letcreate~uri_scheme?(dialect_tag=`Other)?(parameter_style=`None)~can_pool~can_concur~can_transact~describe_has_typed_params~describe_has_typed_fields()={index=(leti=!next_backend_indexinincrnext_backend_index;i);uri_scheme;dialect_tag;parameter_style;describe_has_typed_params;describe_has_typed_fields;can_transact;can_pool;can_concur;}leturi_schemedi=di.uri_schemeletdialect_tagdi=di.dialect_tagletparameter_styledi=di.parameter_styleletcan_pooldi=di.can_poolletcan_concurdi=di.can_concurletcan_transactdi=di.can_transactletdescribe_has_typed_paramsdi=di.describe_has_typed_paramsletdescribe_has_typed_fieldsdi=di.describe_has_typed_fields