Registry / database / vue-sql-builder

vue-sql-builder

JSON →
library0.1.1jsnpmunverified

A Vue.js component for building SQL queries visually. Version 0.1.1 is the initial and only release, no maintenance updates observed. Allows users to construct SQL by selecting tables and fields from a provided JSON structure. Integrates with Vuex for state management. Low release cadence (single version) and minimal documentation limit its reliability for production use.

npm install vue-sql-builder
INSTALL
IMPORT
SIG · VUE-SQL-BUILDER
V
vue-sql-builder
databasejavascriptv0.1.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.

default
import sqlbuilder from 'vue-sql-builder'
const sqlbuilder = require('vue-sql-builder')
Package is ESM-only; CommonJS require() will fail if module resolution not configured.
QueryBuilder
<QueryBuilder :list='tables' />
<QueryBuilder>
Component is auto-registered when using Vue.use(sqlbuilder). Must pass :list prop with table array.
Vue.use
Vue.use(sqlbuilder, { store: store })
Vue.use(sqlbuilder)
Second argument is optional but recommended to pass Vuex store for state management.

Registers the plugin with Vue and Vuex, then uses QueryBuilder component with sample table structure.

import Vue from 'vue'; import sqlbuilder from 'vue-sql-builder'; import Vuex from 'vuex'; const store = new Vuex.Store({}); Vue.use(sqlbuilder, { store }); const tables = [{ name: 'users', fields: [{ name: 'id' }, { name: 'name' }, { name: 'email' }] }]; // In your Vue template: // <QueryBuilder :list="tables" />
Debug
Known issues
breakingComponent will not render if :list prop is missing or malformed.
fix
Ensure :list is an array of objects with 'name' and 'fields' properties.
affects: >=0.0
deprecatedPackage depends on Vue 2, not compatible with Vue 3.
fix
Use with Vue 2 only; for Vue 3, look for alternative packages.
affects: >=0.0
gotchaVuex store is required if using Vue.use with module system, but optional otherwise.
fix
Pass store object as second argument to Vue.use to avoid warnings.
affects: >=0.0
gotchaNo built-in validation for table/field names; SQL injection possible if user input unsanitized.
fix
Always sanitize input when using user-supplied table/field names.
affects: >=0.0
Errors
Common errors & fixes
Vue.use is not a function
Vue not imported correctly or Vue.use called before Vue is fully imported.
fix
Ensure 'import Vue from 'vue'' is at the top of the file.
Cannot read property 'state' of undefined
Store not passed to Vue.use or store is not properly defined.
fix
Create a Vuex store and pass it as second argument to Vue.use.
[Vue warn]: Missing required prop: "list"
QueryBuilder component used without the :list prop.
fix
Add :list="tables" to the QueryBuilder component.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
Meta
2
OpenAI (training)
1
Resources
vue-sql-builder — npm install vue-sql-builder · libregistry