package sqlgg
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
SQL Guided (code) Generator
Install
dune-project
Dependency
Authors
Maintainers
Sources
sqlgg-20260721.tbz
sha256=40d7699187951dd2f17d885c4f4f04124930bf7dc1119d4cca322c5f0cb42d8e
sha512=e7c90683cddcff3ca0ba9de9e40c2c4c69923ea62e2647f1a70083e42ed00b7cab53f8a14d1a965ee4465966bc02fa75fa7cb42e485beae1a9c26bdc252c3665
doc/src/sqlgg.traits/sqlgg_scope.ml.html
Source file sqlgg_scope.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56type ('a, 'brand, 'row, 'params) col = { set : 'params -> unit; read : 'row -> int -> 'a * int; column : string; count : int; deps : 'brand list; } module type Syntax = sig type 'a t val pure : 'a -> 'a t val map : ('a -> 'b) -> 'a t -> 'b t val apply : ('a -> 'b) t -> 'a t -> 'b t val ( let+ ) : 'a t -> ('a -> 'b) -> 'b t val ( and+ ) : 'a t -> 'b t -> ('a * 'b) t end module Syntax = struct let pure x = { set = (fun _p -> ()); read = (fun _row idx -> (x, idx)); column = ""; count = 0; deps = []; } let apply f a = { set = (fun p -> f.set p; a.set p); read = (fun row idx -> let (vf, i1) = f.read row idx in let (va, i2) = a.read row i1 in (vf va, i2)); column = begin match f.column, a.column with | "", c | c, "" -> c | c1, c2 -> c1 ^ ", " ^ c2 end; count = f.count + a.count; deps = f.deps @ List.filter (fun d -> not (List.mem d f.deps)) a.deps; } let map f a = apply (pure f) a let ( let+ ) t f = map f t let ( and+ ) a b = apply (map (fun a b -> (a, b)) a) b end include Syntax module Make (M : sig type brand type row type params end) : Syntax with type 'a t = ('a, M.brand, M.row, M.params) col = struct type 'a t = ('a, M.brand, M.row, M.params) col include Syntax end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>