package ppx_rapper
Syntax extension for Caqti/PostgreSQL queries
Install
Dune Dependency
Authors
Maintainers
Sources
ppx_rapper-3.1.0.tar.gz
md5=d6ce377b4a0d8c1c8f9fefd643c35282
sha512=16cdb7bc4632ebbd77cbed26c1852ad38274c7ae2dd7b3455c6671f3579137f5598fa044b80272457ef859cf79831b087c63de13252630d85b0b8ff4dcfd2125
doc/ppx_rapper/Ppx_rapper/index.html
Module Ppx_rapper
Source
Source
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
Source
val component_expressions :
loc:Ppxlib.location ->
Ppx_rapper__.Query.parsed_query ->
Ppxlib_ast.Ast.expression
* Ppxlib_ast.Ast.expression
* Ppxlib__.Import.expression
Make some subexpressions to be used in generated code
Source
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
Source
val expand_apply :
loc:Ppxlib__.Location.t ->
path:'a ->
string ->
string ->
Base.String.t Base.List.t ->
Ppxlib_ast.Ast.expression
Source
val expand_let :
loc:Ppxlib__.Location.t ->
path:'a ->
string ->
string ->
string ->
Base.String.t Base.List.t ->
Ppxlib__.Import.structure_item
Source
val apply_pattern :
unit ->
(Ppxlib__.Import.expression, string -> string -> string list -> 'a, 'a)
Ppxlib__.Ast_pattern0.t
Captures [%rapper get_one "SELECT id FROM things WHERE condition"]
Source
val let_pattern :
unit ->
(Ppxlib__.Import.payload,
string ->
string ->
string ->
string list ->
'a,
'a)
Ppxlib__.Ast_pattern0.t
Captures [let%rapper get_thing = get_one "SELECT id FROM things WHERE condition"]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>