1.1.14 • Published 2 years ago

sqlitemongo v1.1.14

Weekly downloads
6
License
ISC
Repository
github
Last release
2 years ago

sqlitemongo

Node.js CI Version Snyk Vulnerabilities for npm package Maintenance License npm

Migrate your sqlite3 database to mongodb.

Why?

  • Uses sqlite3 ids to avoid uploading duplicates
  • Copy all tables into mongo collections in a single command

What

It copies all tables from sqlite3 into mongo collections under a specified database. For example, if you have a sqlite3 database file db.sqlite3 with tables: table1 and table2, this tool uploads to a mongo database titled by default sqlite3 with collections table1 and table2.

CLI Usage

  1. Install sqlitemongo globally using sudo npm install --global sqlitemongo.
  2. Run sqlitemongo <sqlitepath> <mongo uri> [<mongo database>]
  3. Done

Module Usage

Just import sqlitemongo from npm npm i sqlitemongo, and start using as below:

const sqlitemongo = require('sqlitemongo');

async function test() {
	var sqlitePath = './test.sqlite3';
	var mongoURI = 'mongo+srv://username:password@hostname.domain/test';
	var mongoDbName = 'test-database';
	await sqlitemongo(sqlitePath, mongoURI, mongoDbName /* optional */);
}
test().catch(console.error);
1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago