File tree Expand file tree Collapse file tree 6 files changed +282
-2
lines changed Expand file tree Collapse file tree 6 files changed +282
-2
lines changed Original file line number Diff line number Diff line change 11/dist
2- /node_modules
2+ .DS_Store
3+ node_modules
34bun.lockb
45package-lock.json
Original file line number Diff line number Diff line change 1+ const sqlkit = require ( "sqlkit" ) ;
2+ const pg = require ( "pg" ) ;
3+
4+ async function main ( ) {
5+ const pool = new pg . Pool ( {
6+ host : "localhost" ,
7+ port : 5432 ,
8+ user : "rayhan" ,
9+ password : "rayhan123" ,
10+ database : "tinyorm_test" ,
11+ } ) ;
12+ const executor = new sqlkit . PostgresAdapter ( pool ) ;
13+
14+ const repo = new sqlkit . Repository ( "users" , executor ) ;
15+
16+ console . log (
17+ await repo . findRows ( {
18+ limit : 10 ,
19+ } )
20+ ) ;
21+ }
22+ main ( ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " sqlkit-node" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " " ,
5+ "license" : " ISC" ,
6+ "author" : " kingrayhan" ,
7+ "type" : " commonjs" ,
8+ "main" : " index.js" ,
9+ "scripts" : {
10+ "test" : " echo \" Error: no test specified\" && exit 1"
11+ },
12+ "dependencies" : {
13+ "pg" : " ^8.14.1" ,
14+ "sqlkit" : " ^1.0.9"
15+ },
16+ "devDependencies" : {
17+ "@types/pg" : " ^8.11.13"
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments