Skip to content
This repository was archived by the owner on Dec 3, 2017. It is now read-only.

Searching with operators other than "equals" #2

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

christophersansone
Copy link

I added Cql::Model#where to accept a hash or string with optional values. The following will all work:

Person.where(first_name: 'John', last_name: 'Doe')
Person.where("first_name = 'John' AND last_name = 'Doe'")
Person.where("first_name = ? AND last_name = ?", ["John", "Doe"])

Among other things, this allows the ability to use operators other than "equals", which is currently all that #find_by supports. In the future, we can also add optional parameters to account for CQL options like ALLOW FILTERING.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant