claviz-database-forms
raw JSON → 0.0.13 verified Sat Apr 25 auth: no javascript
CRUD functionality for PostgreSQL and MSSQL database tables in Claviz. Current stable version: 0.0.13 (March 2025). Release cadence: weekly. Key differentiators: provides no-code tables/forms for database tables, supports autocomplete, XLSX upload, hooks, and styling. Requires external query functions and numeral package.
Common errors
error Error: `format` can only be used on `Date`, `Number` or `"Formula"` cells ↓
cause Numerical values not cast to Numeric type when downloading XLSX.
fix
Update to v0.0.11 or later.
error "$meta" missing in dbTable ↓
cause Bug in v0.0.1 that omits metadata field.
fix
Update to v0.0.2 or later.
Warnings
gotcha Query functions must contain 'executePostgreSqlQuery' or 'executeMssqlQuery' in their name (case-insensitive). ↓
fix Rename functions to include the required substring.
gotcha Validator function signature changed: must accept (values, isExisting) parameters. ↓
fix Update validator functions to match the new signature.
gotcha XLSX upload preview limited to first 100 rows (since v0.0.12). ↓
fix No fix; behavior change accepted.
gotcha Date fields are normalized to UTC (since v0.0.3). ↓
fix Adjust timezone handling in application code.
Install
npm install claviz-database-forms yarn add claviz-database-forms pnpm add claviz-database-forms Imports
- claviz-database-forms
import 'claviz-database-forms'
Quickstart
// Setup: create query functions with specific naming
async function executePostgreSqlQuery(query) {
// implementation using pg client
const result = await client.query(query);
return result.rows;
}
async function executeMssqlQuery(query) {
// implementation using mssql
const result = await pool.request().query(query);
return result.recordset;
}
// Then in Claviz UI, assign these functions to tables/forms.
// Also add clavizAdminUsername and clavizAdminPassword to KeyVault.
// Required: npm install numeral