java.jdbc

If query is called with a bare SQL string instead of a vector, SQLite driver dumps

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

(query db "select * from test") ;; should be a vector

Causes SQLite to dump and probably isn't very pretty on other DBs. java.jdbc should either validate arguments better, or accept a string and package it up itself.

Activity

Hide
Sean Corfield added a comment -
(query db "select * from fruit")

is now legal but will remain undocumented. Since optional positional arguments are expected, any attempt to call query with SQL and params not in a vector will throw an IllegalArgumentException anyway. This seems like a reasonable compromise.

Show
Sean Corfield added a comment -
(query db "select * from fruit")
is now legal but will remain undocumented. Since optional positional arguments are expected, any attempt to call query with SQL and params not in a vector will throw an IllegalArgumentException anyway. This seems like a reasonable compromise.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: