Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Query#to_cql handle invalid values more clearly #29

Open
eprothro opened this issue Jun 14, 2017 · 0 comments
Open

Make Query#to_cql handle invalid values more clearly #29

eprothro opened this issue Jun 14, 2017 · 0 comments

Comments

@eprothro
Copy link
Owner

type
#=> #<Cassandra::Types::Simple:0x007fed37c33300 @kind=:bigint>

params[i]
#=> nil

params
#=> ["55e05d24-513b-11e7-b6b8-33c23e6e0000", 2017-06-14 14:54:54 -0500, nil, nil, "55e0893e-513b-11e7-bd08-0f7a965973cc", "testuser94517816"]

bound_cql
#=> "INSERT INTO some_table (id, other_id, url, other_url, user_id, username) VALUES (?, ?, ?, ?, ?, ?);"

type
#<Cassandra::Types::Simple:0x007fed37c33300 @kind=:bigint>

type.new(nil)
     TypeError:
       can't convert nil into Integer

would be nice to catch type errors and give more info about what param is the culprit.

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

No branches or pull requests

1 participant