File tree Expand file tree Collapse file tree 3 files changed +47
-55
lines changed
Expand file tree Collapse file tree 3 files changed +47
-55
lines changed Original file line number Diff line number Diff line change 1+ ## SQL-to-NOSQL
2+
13As the name suggests, ** sql-to-nosql** lets you run SQL scripts on your NoSQL database.
24
35## Status
@@ -14,6 +16,32 @@ The project is under active development and is not yet ready to use in productio
1416npm insall sql-to-nosql
1517```
1618
19+ ### Usage
20+ ``` js
21+
22+ import { SqlToNoSql } from ' sql-to-nosql' ;
23+
24+ const runner = new SqlToNoSql ({
25+ srcDBtype: " postgresql" ,
26+ destDBtype: " mongodb" ,
27+ connection: " YOUR_DIST_DB_CONNECTION_STRING"
28+ });
29+
30+ const resp = await runner .run (" select * from users where email = devarifhossain@gmail.com" );
31+
32+ console .log (resp);
33+ /** ☝️ [{
34+ _id: new ObjectId("622f07d56852c662cb8b953b"),
35+ role: 'admin',
36+ name: 'Arif Hossain',
37+ email: 'devarifhossain@gmail.com',
38+ __v: 0
39+ }]*/
40+
41+ ```
42+
43+
44+
1745### Roadmap
1846
1947- [ ] Database
@@ -55,3 +83,4 @@ npm insall sql-to-nosql
5583 - [ ] LIKE
5684 - [ ] IS NULL
5785 - [ ] IS NOT NULL
86+ - [ ] Typescript Support
Original file line number Diff line number Diff line change 11{
22 "name" : " sql-to-nosql" ,
3- "version" : " 0.0.5 " ,
3+ "version" : " 0.0.6 " ,
44 "description" : " Run SQL quries on your Mongodb database." ,
55 "repository" : {
66 "type" : " git" ,
99 "homepage" : " https://github.com/ariflogs/SQL-to-NoSQL" ,
1010 "main" : " dist/index.js" ,
1111 "scripts" : {
12+ "dev" : " tsc -w" ,
1213 "start" : " tsc && node dist/index.js" ,
1314 "build" : " npx prettier . --check && tsc" ,
1415 "test" : " echo \" Error: no test specified\" && exit 1" ,
1516 "pretty" : " npx prettier . --write"
1617 },
17- "author" : " Arif Hossain" ,
18+ "author" : {
19+ "name" : " Arif Hossain" ,
20+ "email" : " devarifhossain@gmail.com" ,
21+ "url" : " https://ariflogs.com"
22+ },
23+ "keywords" : [
24+ " ORM" ,
25+ " SQL" ,
26+ " NoSQL" ,
27+ " SQL to NoSQL"
28+ ],
1829 "license" : " MIT" ,
1930 "devDependencies" : {
2031 "prettier" : " 3.0.3" ,
2132 "typescript" : " ^5.2.2"
2233 },
2334 "dependencies" : {
24- "mongodb" : " ^6.1.0" ,
25- "sql-to-nosql" : " ^0.0.3"
35+ "mongodb" : " ^6.1.0"
2636 },
2737 "type" : " module"
28- }
38+ }
You can’t perform that action at this time.
0 commit comments