8000 If the parameter provided to a SQL query is of wrong type, the next identical query with a correct type also fails. by dboissin · Pull Request #95 · mauricio/postgresql-async · GitHub
[go: up one dir, main page]

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

If the parameter provided to a SQL query is of wrong type, the next identical query with a correct type also fails. #95

Merged
merged 1 commit into from
Aug 3, 2014

Conversation

dboissin
Copy link
Contributor
@dboissin dboissin commented Aug 3, 2014

If query SELECT content FROM messages WHERE id = ? (where id is bigint) is send with a String parameter : the method throw a GenericDatabaseException => OK

But after, if a second identical query is send with a correct number value : the method throw an ArrayIndexOutOfBoundsException: : 0 (PostgreSQLConnection.scala:194) => KO

8000

executePreparedStatement(handler, query, Array("undefined")) must throwA[GenericDatabaseException]
val result = executePreparedStatement(handler, query, Array(1)).rows.get
result(0)(0) == content
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a === ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mauricio added a commit that referenced this pull request Aug 3, 2014
If the parameter provided to a SQL query is of wrong type, the next identical query with a correct type also fails.
@mauricio mauricio merged commit 3b7151c into mauricio:master Aug 3, 2014
@mauricio
Copy link
Owner
mauricio commented Aug 3, 2014

Thanks @dboissin !

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.

2 participants
0