Merge pull request #446 from lbryio/427-string-based-operators
427 string based operators
This commit is contained in:
commit
7394758d27
3 changed files with 6 additions and 3 deletions
|
@ -158,7 +158,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {
|
||||||
where: {
|
where: {
|
||||||
name : channelName,
|
name : channelName,
|
||||||
claimId: {
|
claimId: {
|
||||||
$like: `${channelClaimId}%`,
|
[sequelize.Op.like]: `${channelClaimId}%`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
order: [['height', 'ASC']],
|
order: [['height', 'ASC']],
|
||||||
|
|
|
@ -303,7 +303,7 @@ module.exports = (sequelize, { STRING, BOOLEAN, INTEGER, TEXT, DECIMAL }) => {
|
||||||
where: {
|
where: {
|
||||||
name,
|
name,
|
||||||
claimId: {
|
claimId: {
|
||||||
$like: `${shortId}%`,
|
[sequelize.Op.like]: `${shortId}%`,
|
||||||
}},
|
}},
|
||||||
order: [['height', 'ASC']],
|
order: [['height', 'ASC']],
|
||||||
})
|
})
|
||||||
|
|
|
@ -15,7 +15,9 @@ const {database, username, password} = require('../../config/mysqlConfig.js');
|
||||||
const sequelize = new Sequelize(database, username, password, {
|
const sequelize = new Sequelize(database, username, password, {
|
||||||
host : 'localhost',
|
host : 'localhost',
|
||||||
dialect : 'mysql',
|
dialect : 'mysql',
|
||||||
dialectOptions: {decimalNumbers: true},
|
dialectOptions: {
|
||||||
|
decimalNumbers: true
|
||||||
|
},
|
||||||
logging : false,
|
logging : false,
|
||||||
pool : {
|
pool : {
|
||||||
max : 5,
|
max : 5,
|
||||||
|
@ -23,6 +25,7 @@ const sequelize = new Sequelize(database, username, password, {
|
||||||
idle : 10000,
|
idle : 10000,
|
||||||
acquire: 10000,
|
acquire: 10000,
|
||||||
},
|
},
|
||||||
|
operatorsAliases: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
// establish mysql connection
|
// establish mysql connection
|
||||||
|
|
Loading…
Reference in a new issue