feat: static page for fun

This commit is contained in:
2025-04-23 11:09:09 +00:00
parent cc7de6c0dd
commit cda46a7e13
10 changed files with 26 additions and 24 deletions

26
package/c/hemar/hemar--0.1.sql Executable file
View File

@@ -0,0 +1,26 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION hemar" to load this file. \quit
CREATE SCHEMA hemar;
-- Define the parse_text_with_hectic function that uses hectic library
-- Expected usage:
-- ```sql
-- SELECT "hemar"."render"(
-- "declare" :=
-- jsonb_build_object(
-- 'name', 'test',
-- 'config', jsonb_build_object(
-- 'debug', true,
-- 'limit', 100
-- )
-- ),
-- "template" := $hemar$
-- {{ name }} {{ config.limit }}
-- $hemar$
-- );
-- ```
CREATE FUNCTION "hemar"."render"("declare" json, "template" text)
RETURNS text
AS 'hemar', 'render'
LANGUAGE C STRICT;