Registry / database / sql-mvc

sql-mvc

JSON →
library0.0.162jsnpmunverified

SQL-MVC is a web application framework that replaces JavaScript with extended SQL (QUALE) for server-side logic, offering a paradigm inversion for building CRUD apps entirely in SQL. Currently at version 0.0.162 (alpha), it supports MySQL, MS-SQL, Firebird, Oracle, and NuoDB. Unlike traditional MVC frameworks, SQL-MVC uses SQL for models, controllers, and views, aiming to reduce boilerplate. However, the project is experimental with frequent breaking changes, sparse documentation, and minimal community feedback. Weekly downloads are modest, and the node compatibility has been problematic. It is not recommended for production.

npm install sql-mvc
INSTALL
IMPORT
SIG · SQL-MVC
S
sql-mvc
databasejavascriptv0.0.162
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.

sql-mvc
const sqlmvc = require('sql-mvc')
import sqlmvc from 'sql-mvc'
CommonJS only; no ESM support.
QUALE (SQL extensions)
Directly write SQL files with .sql extension
Using .js files for controllers or views
The framework parses .sql files with embedded QUALE tags; .js files are not used for app logic.
Model/Controller/View tags
<#model>...</#> in .sql files
Placing model definitions in separate files per typical MVC convention
All three layers are defined in the same .sql file using special tags.

Creates a simple tasks table and renders it as a table using SQL-MVC's view tag.

// Install: npm install sql-mvc // Create app.sql: <#model CREATE TABLE tasks ( id VARCHAR(40) PRIMARY KEY, title VARCHAR(100), completed BOOLEAN DEFAULT FALSE ); #> <#view table() SELECT id, title, completed FROM tasks; #> // Run: node -e "const sqlmvc = require('sql-mvc'); sqlmvc.run({port: 3000})" // Then open http://localhost:3000
Debug
Known issues
breakingNode version updates often break the framework.
fix
Use Node 8.x or lower; check changelog for driver updates.
affects: >=0.0.162
gotchaALPHA: Not production ready. Frequent breaking changes, undocumented behavior.
fix
Do not use in production; only for experimentation.
affects: >=0.0.0
deprecatedCloud9 IDE install instructions are outdated.
fix
Follow Linux VPS install guide for modern setups.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'sql-mvc'
Package not installed globally or local path not set.
fix
Run `npm install sql-mvc` in project directory.
Error: Cannot find module 'mysql2'
MySQL driver not installed.
fix
Run `npm install mysql2`.
Error: listen EADDRINUSE :::3000
Port 3000 already in use.
fix
Use a different port: `sqlmvc.run({port: 3001})`.
Upgrade
Version history
0.0.162latest on npm
Audit
Dependencies
mysql2optionalMySQL driver
mssqloptionalMS-SQL driver
node-firebirdoptionalFirebird driver
Agent activity
16 hits · last 30 days
node
14
Meta
1
OpenAI (training)
1
Resources
sql-mvc — npm install sql-mvc · libregistry