feat: fusebox updates + vue-component-plugin
This commit is contained in:
@@ -6,13 +6,53 @@ const fs = require('fs')
|
||||
const path = require('path')
|
||||
const _ = require('lodash')
|
||||
const Promise = require('bluebird')
|
||||
const Sequelize = require('sequelize')
|
||||
const Op = Sequelize.Op
|
||||
|
||||
const operatorsAliases = {
|
||||
$eq: Op.eq,
|
||||
$ne: Op.ne,
|
||||
$gte: Op.gte,
|
||||
$gt: Op.gt,
|
||||
$lte: Op.lte,
|
||||
$lt: Op.lt,
|
||||
$not: Op.not,
|
||||
$in: Op.in,
|
||||
$notIn: Op.notIn,
|
||||
$is: Op.is,
|
||||
$like: Op.like,
|
||||
$notLike: Op.notLike,
|
||||
$iLike: Op.iLike,
|
||||
$notILike: Op.notILike,
|
||||
$regexp: Op.regexp,
|
||||
$notRegexp: Op.notRegexp,
|
||||
$iRegexp: Op.iRegexp,
|
||||
$notIRegexp: Op.notIRegexp,
|
||||
$between: Op.between,
|
||||
$notBetween: Op.notBetween,
|
||||
$overlap: Op.overlap,
|
||||
$contains: Op.contains,
|
||||
$contained: Op.contained,
|
||||
$adjacent: Op.adjacent,
|
||||
$strictLeft: Op.strictLeft,
|
||||
$strictRight: Op.strictRight,
|
||||
$noExtendRight: Op.noExtendRight,
|
||||
$noExtendLeft: Op.noExtendLeft,
|
||||
$and: Op.and,
|
||||
$or: Op.or,
|
||||
$any: Op.any,
|
||||
$all: Op.all,
|
||||
$values: Op.values,
|
||||
$col: Op.col
|
||||
}
|
||||
|
||||
/**
|
||||
* PostgreSQL DB module
|
||||
*/
|
||||
module.exports = {
|
||||
|
||||
Sequelize: require('sequelize'),
|
||||
Sequelize,
|
||||
Op: Sequelize.Op,
|
||||
|
||||
/**
|
||||
* Initialize DB
|
||||
@@ -35,7 +75,8 @@ module.exports = {
|
||||
min: 0,
|
||||
idle: 10000
|
||||
},
|
||||
logging: false
|
||||
logging: false,
|
||||
operatorsAliases
|
||||
})
|
||||
|
||||
// Attempt to connect and authenticate to DB
|
||||
@@ -43,7 +84,7 @@ module.exports = {
|
||||
self.inst.authenticate().then(() => {
|
||||
wiki.logger.info('Database (PostgreSQL) connection: OK')
|
||||
}).catch(err => {
|
||||
wiki.logger.error('Failed to connect to MongoDB instance.')
|
||||
wiki.logger.error('Failed to connect to PostgreSQL instance.')
|
||||
return err
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user