hershel-theodore-layton/sql-queryf-codegen

Customize your queryf DSL to your heart's content

dev-master 2025-06-28 15:12 UTC

This package is auto-updated.

Last update: 2025-06-28 15:13:06 UTC


README

Customize your queryf DSL to your heart's content.

This package contains some presets for you own sql-queryf engines. The basic HH\\Lib\\SQL\\Query-like engine can be generated with vendor/bin/sql-queryf --vanilla. If you want to see what's possible, use --extended instead of --vanilla. If you want to customize, see HTL\\SqlQueryfCodegen\\Presets. A usage example can be found in vendor/hershel-theodore-layton/sql-queryf-codegen/bin/sql-queryf.hack.

$your_engine = PrintfStateMachine\Factory::create(
  PrintfStateMachine\hack_type('Sql'),
  SqlQueryfCodegen\StaticTypeAssertionGenerator::create(dict[]),
)
  |> $$->apply(SqlQueryfCodegen\Presets::vanilla<>)
  |> SqlQueryfCodegen\codegen($$, PrintfStateMachine\ENGINE_TEMPLATE);