Registry / database / zol-string

zol-string

JSON →
library0.5.1jsnpmunverified

SQL string functions for the Zol ORM (v0.5.1). Provides typed helpers for building SQL string operations like concatenation, case conversion, and pattern matching in PostgreSQL. Integrates tightly with Zol's query builder, shipping TypeScript types. Updated irregularly alongside Zol. Differentiator: minimal abstraction over raw SQL strings vs. heavier ORM alternatives.

npm install zol-string
INSTALL
IMPORT
SIG · ZOL-STRING
Z
zol-string
databasejavascriptv0.5.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sqlConcat
import { sqlConcat } from 'zol-string'
const sqlConcat = require('zol-string')
ESM-only package; CommonJS require is unsupported.
sqlLower
import { sqlLower } from 'zol-string'
import { sqlLower } from 'zol'
These functions are in a separate package, not part of zol core.
sqlSubstring
import { sqlSubstring } from 'zol-string'
Named export; no default export.

Demonstrates concatenating and lowercasing columns using zol-string functions inside a Zol query.

import { z } from 'zol'; import { sqlConcat, sqlLower } from 'zol-string'; const query = z.select({ fullName: sqlConcat('first_name', "' '", 'last_name'), lowerEmail: sqlLower('email') }).from('users'); console.log(query.toSQL()); // Output: SELECT first_name || ' ' || last_name AS "fullName", LOWER(email) AS "lowerEmail" FROM users
Debug
Known issues
breakingBreaking change in v0.5.0: renamed exports (e.g., `concat` → `sqlConcatenate`).
fix
Update imports to new names: `sqlConcat`, `sqlLower`, etc.
affects: >=0.5.0 <0.6.0
gotchaCannot use in raw SQL strings; functions must be inside a Zol query builder.
fix
Always wrap in `z.select(...)` or similar builder.
affects: >=0.1.0
gotchaRequires peer dependency `zol@^0.5.1`; mismatched versions cause runtime errors.
fix
Keep `zol` at version ^0.5.1.
affects: >=0.1.0
Errors
Common errors & fixes
Cannot find module 'zol-string' or its corresponding type declarations.
Package not installed or type resolution misconfigured.
fix
Run `npm install zol-string` and ensure tsconfig includes node_modules types.
Uncaught TypeError: (0 , zol_string__WEBPACK_IMPORTED_MODULE_0__.sqlConcat) is not a function
Importing from wrong path or using incorrect export name.
fix
Verify import: `import { sqlConcat } from 'zol-string';`
Module not found: Can't resolve 'zol-string'
Package not installed or bundler configuration issue.
fix
Install package and ensure it's in dependencies.
Upgrade
Version history
0.5.1latest on npm
Audit
Dependencies
zolrequiredpeer dependency; provides core query builder and SQL context
Agent activity
34 hits · last 30 days
node
32
OpenAI (training)
1
Resources
zol-string — npm install zol-string · libregistry