package ppx_rapper

  1. Overview
  2. Docs
val parse_args : Base.String.t Base.List.t -> ([> `Labelled_args | `Record ] * [> `Function | `Record | `Tuple ] * bool, string) Base.result

Handle 'record_in' etc. in %rapper "SELECT * FROM USERS" record_in record_out

val component_expressions : loc:Ppxlib.location -> Ppx_rapper__.Query.parsed_query -> Ppxlib_ast.Ast.expression * Ppxlib_ast.Ast.expression * Astlib.Ast_500.Parsetree.expression

Make some subexpressions to be used in generated code

val make_expand_get_and_exec_expression : loc:Ppxlib.Location.t -> Ppx_rapper__.Query.parsed_query -> [ `Labelled_args | `Record ] -> [ `Tuple | `Record | `Function ] -> (Ppxlib_ast.Ast.expression -> (body_fn:(Ppxlib_ast.Ast.expression -> Ppxlib_ast.Ast.expression) -> loc:Ppxlib.Location.t -> Ppx_rapper__.Codegen.extension_contents -> Ppxlib_ast.Ast.expression) -> (Ppxlib_ast.Ast.expression, Base.string) Base.result) * (Ppxlib_ast.Ast.expression -> (body_fn:(Ppxlib_ast.Ast.expression -> Ppxlib_ast.Ast.expression) -> loc:Ppxlib.Location.t -> Ppx_rapper__.Codegen.extension_contents -> Ppxlib_ast.Ast.expression) -> (Ppxlib_ast.Ast.expression, Base.string) Base.result)

Make a function expand_get to produce the expressions for get_one, get_opt and get_many, and a similar expand_exec for execute

val expand : loc:Ppxlib.Location.t -> path:'a -> string -> string -> Base.String.t Base.List.t -> Ppxlib_ast.Ast.expression
val pattern : (Astlib.Ast_500.Parsetree.expression, string -> string -> string list -> Astlib.Ast_500.Parsetree.expression, Astlib.Ast_500.Parsetree.expression) Ppxlib__.Ast_pattern0.t

Captures [%rapper get_one "SELECT id FROM things WHERE condition"]

val name : string