Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

A JavaScript client library for SQLizer.io, easily converting CSV, JSON, XML and Spreadsheet files into SQL

License

Notifications You must be signed in to change notification settings

sqlizer-io/sqlizer-client-js

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlizer-client-js

A JavaScript client library for SQLizer.io, easily converting CSV, JSON, XML and Spreadsheet files into SQL.

Getting Started

Install the library:

npm i sqlizer-client

Then import the SQLizerFile class and use it to convert a file:

const { createWriteStream } = require('fs');
const { SQLizerFile } = require('sqlizer-client');

const sqlizerFile = new SQLizerFile({
  ApiKey: '[MY API KEY]',
  FileType: 'csv',
  FileName: 'my-file.csv',
  TableName: 'my_table',
  DatabaseType: 'SQLite',
  FileHasHeaders: true,
  Delimiter: ',',
  CheckTableExists: true,
  InsertSpacing: 150,
  Path: './my-file.csv'
});

// Create a writable stream to store the generated SQL
var writeStream = createWriteStream('./my-result.sql', { flags : 'w' });

// Ask SQLizer to run the conversion and pipe the results to our file
sqlizerFile.convert().then(results => results.pipe(writeStream));

About

A JavaScript client library for SQLizer.io, easily converting CSV, JSON, XML and Spreadsheet files into SQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.