Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Sequelize conditional shorthands

$and: {a: 5}           // AND (a = 5)
$or: [{a: 5}, {a: 6}]  // (a = 5 OR a = 6)
$gt: 6,                // > 6
$gte: 6,               // >= 6
$lt: 10,               // < 10
$lte: 10,              // <= 10
$ne: 20,               // != 20
$eq: 3,                // = 3
$not: true,            // IS NOT TRUE
$between: [6, 10],     // BETWEEN 6 AND 10
$notBetween: [11, 15], // NOT BETWEEN 11 AND 15
$in: [1, 2],           // IN [1, 2]
$notIn: [1, 2],        // NOT IN [1, 2]
$like: '%hat',         // LIKE '%hat'
$notLike: '%hat'       // NOT LIKE '%hat'
$iLike: '%hat'         // ILIKE '%hat' (case insensitive) (PG only)
$notILike: '%hat'      // NOT ILIKE '%hat'  (PG only)
$like: { $any: ['cat', 'hat']}       // LIKE ANY ARRAY['cat', 'hat'] - also works for iLike and notLike
$overlap: [1, 2]       // && [1, 2] (PG array overlap operator)
$contains: [1, 2]      // @> [1, 2] (PG array contains operator)
$contained: [1, 2]     // <@ [1, 2] (PG array contained by operator)
$any: [2,3]            // ANY ARRAY[2, 3]::INTEGER (PG only)
Comment

PREVIOUS NEXT
Code Example
Javascript :: Third Example of Event Delegation In JavaScript 
Javascript :: react native push notifications cancel delivered notification 
Javascript :: cleave js 
Javascript :: Simple Mustache.js 
Javascript :: laravel sending email to outlook link not working 
Javascript :: convert pcap fiole to json tshark 
Javascript :: Remove # id From URL When Clicked On Href Link 
Javascript :: function x(a) vs function x(...a) the difference 
Javascript :: phaser matrix rotate 
Javascript :: controllare che ci sia un file in javascript 
Javascript :: Creating New Transaction Object for blockchain 
Javascript :: This Refers To The Window Object Here 
Javascript :: A Node Module For ReactJS 
Javascript :: sol.common.MapTable elo 
Javascript :: Good Example: Focus moved to AJAX content with tabindex="-1" after a delay 
Javascript :: cookie in Auth header 
Javascript :: prisma Return a relations count with include 
Javascript :: javascript hide div 
Javascript :: jQuery mobile anchor link on the same page 
Javascript :: NavBar with divs 
Javascript :: Backbone Render 
Javascript :: swal on submit angular with cancel butotn 
Javascript :: Populate a Select Dropdown List using JSON 
Javascript :: create number format excel react native 
Javascript :: convert text to number 
Javascript :: javascript declare multiple variables on one line 
Javascript :: javascript promise example 
Javascript :: jwt_access_secret generator 
Javascript :: javascript json to excel 
Javascript :: how to add prefix to a string in javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =