Skip to content

Make Query#to_cql handle invalid values more clearly #29

Description

@eprothro
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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions