Building a Type-Safe SQL Template Engine
summary
A tiny PHP library implements a type-safe SQL template engine that relies on PDO::quote-only escaping, supports typed placeholders like @in@string and @int, and can expand variable-length IN lists and paging. It compiles, binds, and executes queries in a single call using a processor pipeline and a preg-replace callback replacer to perform all replacements in one pass, and intentionally avoids full SQL parsing or DB-specific identifier quoting, so it’s suitable for simple templating but needs additional adapters, documentation, and tests for wider use.
AI-written summary · about
