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.json_path/json_path.ml.html
Source file json_path.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 43open Ast module Lexer = Json_path_lexer module Parser =Json_path_parser let parse_json_path input = let lexbuf = Lexing.from_string input in try Parser.path_expression Lexer.token lexbuf with | Lexer.LexError msg -> failwith ("Lexer error: " ^ msg) | Parser.Error -> let pos = Lexing.lexeme_start_p lexbuf in failwith (Printf.sprintf "Parser error at line %d, column %d" pos.pos_lnum (pos.pos_cnum - pos.pos_bol)) let is_valid input = try let _ = parse_json_path input in true with | _ -> false let string_of_array_index = function | Index n -> string_of_int n | Wildcard -> "*" | Last -> "last" | LastOffset n -> "last-" ^ string_of_int n let string_of_range range = string_of_array_index range.start_idx ^ " to " ^ string_of_array_index range.end_idx let string_of_path_leg = function | Member key when String.contains key ' ' || String.contains key '-' -> ".\"" ^ key ^ "\"" | Member key -> "." ^ key | ArrayAccess idx -> "[" ^ string_of_array_index idx ^ "]" | ArrayRange range -> "[" ^ string_of_range range ^ "]" | MemberWildcard -> ".*" | DoubleWildcard -> "**" let string_of_json_path path = path.scope ^ String.concat "" (List.map string_of_path_leg path.legs)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>