durcno@1.0.0-alpha.25
Minor Changes
-
b71d48b - Thanks to @almahdi404 !
feat(ddl): add extension and schema existence helper functions
Introduces PostgreSQL extension DDL support (
CREATE EXTENSIONandDROP EXTENSION) to the migration DDL API, along withIF NOT EXISTS/IF EXISTShelper functions for schemas and extensions.The new helper functions include
createExtension,createExtensionIfNotExists,dropExtension,dropExtensionIfExists,createSchemaIfNotExists, anddropSchemaIfExists.ddl.createExtensionIfNotExists("vector").withSchema("public");// CREATE EXTENSION IF NOT EXISTS "vector" WITH SCHEMA "public";ddl.createSchemaIfNotExists("analytics");// CREATE SCHEMA IF NOT EXISTS analytics; -
ac78909 - Thanks to @almahdi404 !
feat(functions): support literals and arguments
Updated string and mathematical SQL functions to support literal values (e.g., strings, numbers) and
Arginstances, expanding their flexibility beyond only accepting columns and other SQL functions.import { abs, Arg, lower } from "durcno";// You can now pass literal values directlylower("HELLO"); // -> lower('HELLO')abs(-42); // -> abs(-42)// As well as Arg instancesabs(Arg.number()); // -> abs($1) -
d7cd66d - Thanks to @almahdi404 !
feat(filters): add ilike string filter
Introduces
ilike(col, pattern)for case-insensitive pattern matching in WHERE and CHECK clauses, wrapping PostgreSQL'sILIKEoperator.Supports both string literal patterns and query parameters via
Arg.import { ilike } from "durcno";await db.from(Users).select().where(ilike(Users.email, "%@example.com"));