Browse Source

proc routes (uncomplete)

pull/122/head
Zbynek Rybicka 6 years ago committed by Jeremy Nagel
parent
commit
58418fb351
  1. 1
      lib/xapi.js
  2. 18
      lib/xsql.js

1
lib/xapi.js

@ -348,6 +348,7 @@ class Xapi {
/**************** START : call stored procedures ****************/
this.app.get('/_proc', this.asyncMiddleware(this.proc.bind(this)))
stat.apis += 1
const procResources = this.mysql.getProcList(true, this.config.apiPrefix)
/**************** END : call stored procedures ****************/
let statStr =

18
lib/xsql.js

@ -13,6 +13,7 @@ class Xsql {
this.pool = {};
this.metaDb = {};
this.metaDb.tables = {};
this.metaDb.routines = {}
this.sqlConfig = sqlConfig;
this.pool = pool;
@ -49,10 +50,11 @@ class Xsql {
}
}
self.iterateToCacheTables(results);
self.iterateToCacheTablePks(results);
self.iterateToCacheTableColumns(results);
self.iterateToCacheTableFks(results);
self.iterateToCacheTables(results)
self.iterateToCacheTablePks(results)
self.iterateToCacheTableColumns(results)
self.iterateToCacheTableFks(results)
self.iterateToCacheRoutines(results)
// osx mysql server has limitations related to open_tables
self.pool.query("FLUSH TABLES", [], (err, results) => {
@ -741,6 +743,14 @@ class Xsql {
return schemaRoutes;
}
getProcList() {
let procRoutes = []
for (var procName in this.metaDb.routines) {
}
return procRoutes
}
getJoinType(joinInQueryParams) {
//console.log('joinInQueryParams',joinInQueryParams);

Loading…
Cancel
Save