Skip to content

Instantly share code, notes, and snippets.

@pbogunovich
Created June 29, 2012 19:08
Show Gist options
  • Save pbogunovich/3020011 to your computer and use it in GitHub Desktop.
Save pbogunovich/3020011 to your computer and use it in GitHub Desktop.
# ruby string management seems to not properly understand the MSG_PROMPT escape character. | # comment out for production code(?)
# In order to avoid data loss the @record_set array is built once that all tuples have been retrieved | # table_name = extract_table_name_from_insertion_query(sql)
@record_set = record_set.split("\t]\n") | # make_sure_pk_works(table_name,name)
| hdl = execute(sql, name)
if @record_set.length != @query['rows'].to_i | # last_auto_generated_id = hdl.get_last_auto_generated_id
raise MonetDBQueryError, "Warning: Query #{@query['id']} declared to result in #{@query['rows']} but #{| end
@record_set.length} returned instead" |
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment