File tree Expand file tree Collapse file tree 4 files changed +4
-19
lines changed Expand file tree Collapse file tree 4 files changed +4
-19
lines changed Original file line number Diff line number Diff line change 1- /**
2- *
3- * @param {* } ast
4- * @param {import("../jsql/Database") } db
5- */
61module . exports = ( ast , db ) => {
72 if ( ast . type . toLowerCase ( ) !== 'create' ) throw new TypeError ( 'invalid query type' ) ;
83 if ( ast . keyword !== 'table' ) throw new Error ( `Unsupported ${ ast . keyword } ` ) ;
Original file line number Diff line number Diff line change 1- /**
2- *
3- * @param {* } ast
4- * @param {import("../jsql/Database") } db
5- */
61module . exports = ( ast , db ) => {
72 if ( ast . type . toLowerCase ( ) !== 'insert' ) throw new TypeError ( 'invalid query type' ) ;
83 const table = ast . table [ 0 ] . table ;
Original file line number Diff line number Diff line change 1- /**
2- *
3- * @param {* } ast
4- * @param {import("../jsql/Database") } db
5- */
61module . exports = ( ast , db ) => {
72 if ( ast . type . toLowerCase ( ) !== 'select' ) throw new TypeError ( 'invalid query type' ) ;
83 const table = ast . from [ 0 ] . table ;
Original file line number Diff line number Diff line change 11const sql = require ( '../sql/parser' ) ;
22const fs = require ( 'fs' ) ;
33const handlers = {
4- create : require ( '../Util /create' ) ,
5- select : require ( '../Util /select' ) ,
6- insert : require ( '../Util /insert' ) ,
7- drop : require ( '../Util /drop' ) ,
4+ create : require ( '../util /create' ) ,
5+ select : require ( '../util /select' ) ,
6+ insert : require ( '../util /insert' ) ,
7+ drop : require ( '../util /drop' ) ,
88} ;
99
1010class Database {
You can’t perform that action at this time.
0 commit comments