Skip to content

Simple wasm wrapper around sqldef for easy use with web/node/bun/deno

License

Notifications You must be signed in to change notification settings

sqldef/sqldef-wasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a wasm-compiled version of sqldef for easy use in JS.

usage

node/bun/etc

npm i sqldef
import sqldef from sqldef

const output = await (sqldef({
  type,         // the type of your database ("mysql" or "postgres")
  database,     // the name of your database
  user,         // the username of your database
  password,     // the password of your database
  host,         // the hostname of your database
  port,         // the port of your database
  socket,       // the unix socket (for mysql)
  file,         // the schema file to read/write
  dry: true,    // dry run - don't do anything to the database
  get: true     // get the current definition from database
}))

TODO: notes about web

development

Normally, you should not need to do this stuff, but for local dev:

# start a watching local web-server
# /sqldef is aliased to root-dir
npm start

# run all unit-tests
npm t

About

Simple wasm wrapper around sqldef for easy use with web/node/bun/deno

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published