Module Sql_ast

type sqlVarToken = string Cobol_common.with_loc
val compare_sqlVarToken : sqlVarToken -> sqlVarToken -> Ppx_deriving_runtime.int
type cobolVarId = string Cobol_common.with_loc
val compare_cobolVarId : cobolVarId -> cobolVarId -> Ppx_deriving_runtime.int
type cobol_var =
  1. | NotNull of cobolVarId
  2. | NullIndicator of cobolVarId * cobolVarId
val compare_cobol_var : cobol_var -> cobol_var -> Ppx_deriving_runtime.int
type variable =
  1. | SqlVar of sqlVarToken
  2. | CobolVar of cobol_var
val compare_variable : variable -> variable -> Ppx_deriving_runtime.int
type literal =
  1. | LiteralVar of variable
  2. | LiteralNum of string Cobol_common.with_loc
  3. | LiteralStr of string Cobol_common.with_loc
  4. | LiteralDot of string Cobol_common.with_loc list
val compare_literal : literal -> literal -> Ppx_deriving_runtime.int
type sql_token =
  1. | SqlInstr of string
  2. | SqlVarToken of variable
  3. | SqlLit of literal
  4. | SqlQuery of sql_query
  5. | SqlEquality of sql_equal
  6. | SqlSearchCondition of search_condition
and sql_instruction = sql_token list
and complex_literal =
  1. | SqlCompLit of literal
  2. | SqlCompAs of literal * sqlVarToken
  3. | SqlCompFun of sqlVarToken * sql_op list
  4. | SqlCompStar
and esql_instuction =
  1. | At of variable * esql_instuction
  2. | Sql of sql_instruction
  3. | Begin
  4. | BeginDeclare
  5. | Exeption of try_block
  6. | EndDeclare
  7. | StartTransaction
  8. | Whenever of whenever_condition * whenever_continuation
  9. | Include of sqlVarToken
  10. | Connect of connect_syntax
  11. | Rollback of rb_work_or_tran option * rb_args option
  12. | Commit of rb_work_or_tran option * bool
  13. | Savepoint of variable
  14. | SelectInto of {
    1. vars : cobol_var list;
    2. select : sql_select;
    3. select_options : sql_select_option list;
    }
  15. | DeclareTable of literal * (sqlVarToken * sql_type) list
  16. | DeclareCursor of cursor
  17. | Prepare of sqlVarToken * sql_instruction
  18. | ExecuteImmediate of sql_instruction
  19. | ExecuteIntoUsing of {
    1. executed_string : sqlVarToken;
    2. opt_into_hostref_list : cobol_var list option;
    3. opt_using_hostref_list : cobol_var list option;
    }
  20. | Disconnect of variable option
  21. | DisconnectAll
  22. | Open of sqlVarToken * cobol_var list option
  23. | Close of sqlVarToken
  24. | Fetch of sql_instruction * cobol_var list
  25. | Insert of table * value list
  26. | Delete of sql_instruction
  27. | Update of sqlVarToken * sql_update * update_arg option
  28. | Ignore of sql_instruction
and try_block = {
  1. try_instruction : esql_instuction;
  2. try_exceptions : sql_exception list;
}
and sql_exception =
  1. | RaiseAndPrint of sqlVarToken * string Cobol_common.with_loc * cobol_var
and cursor =
  1. | DeclareCursorSql of sqlVarToken * sql_query
  2. | DeclareCursorVar of sqlVarToken * variable
  3. | DeclareCursorWhithHold of sqlVarToken * sql_query
and table =
  1. | Table of sqlVarToken
  2. | TableLst of sqlVarToken * sqlVarToken list
and value =
  1. | ValueNull
  2. | ValueDefault
  3. | ValueList of literal list
and rb_work_or_tran =
  1. | Work
  2. | Transaction
and rb_args =
  1. | Release
  2. | To of sqlVarToken
and connect_syntax =
  1. | Connect_to_idby of {
    1. dbname : literal;
    2. db_conn_id : literal option;
    3. username : literal;
    4. db_data_source : literal;
    5. password : literal;
    }
  2. | Connect_to of {
    1. db_data_source : literal;
    2. db_conn_id : literal option;
    3. username : literal;
    4. password : literal option;
    }
  3. | Connect_using of {
    1. db_data_source : literal;
    }
  4. | Connect_user of {
    1. username : literal;
    2. password : literal;
    3. db_conn_id : literal option;
    4. db_data_source : literal option;
    }
  5. | Connect_reset of literal option
and sql_type =
  1. | NotNull of sql_type
  2. | Date
  3. | Integer
  4. | Timestamp
  5. | VarChar of literal
and whenever_condition =
  1. | Not_found_whenever
  2. | SqlError_whenever
  3. | SqlWarning_whenever
and whenever_continuation =
  1. | Continue
  2. | Perform of sqlVarToken
  3. | Goto of sqlVarToken
and update_arg =
  1. | WhereCurrentOf of sqlVarToken
  2. | UpdateSql of sql_instruction
and sql_query =
  1. | SelectUnion of sql_query * sql_query
  2. | SelectExcept of sql_query * sql_query
  3. | SelectIntersect of sql_query * sql_query
  4. | SelectQuery of sql_select * sql_select_option list
and sql_select_option =
  1. | From of from_stm
  2. | Where of search_condition
  3. | OrderBy of sql_orderBy list
  4. | GroupBy of literal list
  5. | Having of search_condition
and from_stm = table_ref list
and table_ref =
  1. | FromLitAs of table_ref * literal
  2. | FromLit of literal
  3. | FromSelect of sql_query
  4. | Join of table_ref * join * table_ref * join_option option
and join =
  1. | InnerJoin
  2. | NaturalJoin
  3. | LeftJoin
  4. | RightJoin
and join_option =
  1. | JoinOn of search_condition
  2. | JoinUsing of sqlVarToken list
and sql_orderBy =
  1. | Asc of literal
  2. | Desc of literal
and sql_select = sql_op list
and sql_update = sql_equal list
and sql_equal = sqlVarToken * sql_op
and sql_op =
  1. | SqlOpLit of complex_literal
  2. | SqlOpBinop of sql_binop * complex_literal * sql_op
and sql_binop =
  1. | Add
  2. | Minus
  3. | Times
  4. | Or
and search_condition =
  1. | WhereConditionOr of search_condition * search_condition
  2. | WhereConditionAnd of search_condition * search_condition
  3. | WhereConditionNot of search_condition
  4. | WhereConditionCompare of sql_compare
  5. | WhereConditionIn of sql_condition_in
  6. | WhereConditionBetween of between_condition
  7. | WhereConditionIsNull of variable
and between_condition =
  1. | Between of literal * literal * literal
and sql_condition_in =
  1. | InVarLst of literal * complex_literal list
and sql_compare =
  1. | CompareQuery of complex_literal * comp_operator * sql_instruction
  2. | CompareLit of complex_literal * comp_operator * complex_literal
and comp_operator =
  1. | Less
  2. | Great
  3. | LessEq
  4. | GreatEq
  5. | EqualComp
  6. | Diff
val compare_sql_token : sql_token -> sql_token -> Ppx_deriving_runtime.int
val compare_sql_instruction : sql_instruction -> sql_instruction -> Ppx_deriving_runtime.int
val compare_complex_literal : complex_literal -> complex_literal -> Ppx_deriving_runtime.int
val compare_esql_instuction : esql_instuction -> esql_instuction -> Ppx_deriving_runtime.int
val compare_try_block : try_block -> try_block -> Ppx_deriving_runtime.int
val compare_sql_exception : sql_exception -> sql_exception -> Ppx_deriving_runtime.int
val compare_cursor : cursor -> cursor -> Ppx_deriving_runtime.int
val compare_table : table -> table -> Ppx_deriving_runtime.int
val compare_value : value -> value -> Ppx_deriving_runtime.int
val compare_rb_work_or_tran : rb_work_or_tran -> rb_work_or_tran -> Ppx_deriving_runtime.int
val compare_rb_args : rb_args -> rb_args -> Ppx_deriving_runtime.int
val compare_connect_syntax : connect_syntax -> connect_syntax -> Ppx_deriving_runtime.int
val compare_sql_type : sql_type -> sql_type -> Ppx_deriving_runtime.int
val compare_whenever_condition : whenever_condition -> whenever_condition -> Ppx_deriving_runtime.int
val compare_whenever_continuation : whenever_continuation -> whenever_continuation -> Ppx_deriving_runtime.int
val compare_update_arg : update_arg -> update_arg -> Ppx_deriving_runtime.int
val compare_sql_query : sql_query -> sql_query -> Ppx_deriving_runtime.int
val compare_sql_select_option : sql_select_option -> sql_select_option -> Ppx_deriving_runtime.int
val compare_from_stm : from_stm -> from_stm -> Ppx_deriving_runtime.int
val compare_table_ref : table_ref -> table_ref -> Ppx_deriving_runtime.int
val compare_join : join -> join -> Ppx_deriving_runtime.int
val compare_join_option : join_option -> join_option -> Ppx_deriving_runtime.int
val compare_sql_orderBy : sql_orderBy -> sql_orderBy -> Ppx_deriving_runtime.int
val compare_sql_select : sql_select -> sql_select -> Ppx_deriving_runtime.int
val compare_sql_update : sql_update -> sql_update -> Ppx_deriving_runtime.int
val compare_sql_equal : sql_equal -> sql_equal -> Ppx_deriving_runtime.int
val compare_sql_op : sql_op -> sql_op -> Ppx_deriving_runtime.int
val compare_sql_binop : sql_binop -> sql_binop -> Ppx_deriving_runtime.int
val compare_search_condition : search_condition -> search_condition -> Ppx_deriving_runtime.int
val compare_between_condition : between_condition -> between_condition -> Ppx_deriving_runtime.int
val compare_sql_condition_in : sql_condition_in -> sql_condition_in -> Ppx_deriving_runtime.int
val compare_sql_compare : sql_compare -> sql_compare -> Ppx_deriving_runtime.int
val compare_comp_operator : comp_operator -> comp_operator -> Ppx_deriving_runtime.int
val compare : esql_instuction -> esql_instuction -> Ppx_deriving_runtime.int
module Printer : sig ... end