balderdashy / balderdashy/sails

waterline-sql-builder error on criteria value 'NOT', 'AND', 'OR', 'IN', 'NOTIN'

Open
#4,596 5 comments 0 reactions 0 assignees View on GitHub
bug helpful info or workaround mysql orm postgresql
Dominant language
JavaScript
Stars
22.8k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

**Sails version**: 1.1.0
**Node version**: v10.1.0
**NPM version**: 6.7.0
**DB adapter name**: sails-mysql
**DB adapter version**: 1.0.1
**Operating system**: docker node image


https://github.com/max918/waterline-sql-builder-error-on-criteria-value-NOT-AND-OR-IN-NOTIN-

simple test in config/bootstrap.js

AdapterError: Unexpected error from database adapter: Undefined binding(s) detected when compiling SELECT query: select `createdAt`, `updatedAt`, `id`, `code`, `order` from `area` where `code` in (?) and `order` = ? limit ?

Contributor guide

Open the contributing guide

Research direction

The report identifies a simple test in config/bootstrap.js and links to a minimal reproduction repository. Start by running that reproduction with the reported Sails, Node, and sails-mysql versions, then trace the SQL-builder path that handles criteria values such as NOT, AND, OR, IN, and NOTIN. Done means the query no longer produces undefined bindings for these values and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mysql
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.