Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.
/ lib_mustache Public archive

Basic Mustache template engine for PostgreSQL (PL/pgSQL)

Notifications You must be signed in to change notification settings

netwo-io/lib_mustache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mustache template engine for PL/pgSQL

Features

  • ✓ variable unescaped {{&name}} and {{{name}}}

  • ✓ variable escaped {{name}}

  • ❏ conditions

  • ❏ loop

  • ❏ contexts

  • ❏ sections

    • ❏ list

    • ❏ non-false values

    • ❏ lambdas

    • ❏ inverted

  • ❏ comments

  • ❏ partials

Usage

examples/render.sql
select lib_mustache.render('<h1>{{&header}}</h1><p>{{&sub.value}}</p>', '{
  "header": "awesome header",
  "sub": {
    "value": "paragraph"
  }
}'::jsonb);

API

SQL Conventions