Skip to content

Instantly share code, notes, and snippets.

@mickhansen
Created April 21, 2015 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mickhansen/7a3a85433557244e17a2 to your computer and use it in GitHub Desktop.
Save mickhansen/7a3a85433557244e17a2 to your computer and use it in GitHub Desktop.
Sequelize JSONB Querying proposal
{
field: {
propa: 'valuea',
propb: {
propc: 'valueb'
}
}
}
// "field"#>>'{propa}' = 'valuea' AND "field"#>>'{propb, propc}' = 'valueb'
{
field: {
$contains: {
company: "Magnafone"
}
}
}
// field @> '{"company": "Magnafone"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment