Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix extra bracket in save.sql #6

Merged
merged 1 commit into from

2 participants

@e1ven

It looks like there's an extra (unintended) bracket in save.sql

With the bracket:
CPD-MacBook-Pro:mongolike Admin$ psql Tavern < save.sql
ERROR: SyntaxError: Unexpected token if
DETAIL: save() LINE 23: if (res == 0) { // If it didnt affect anything, it must be a new row. Insert

With it removed:

CPD-MacBook-Pro:mongolike Admin$ psql Tavern < save.sql
CREATE FUNCTION
@JerrySievert
Owner

d'oh! thanks for the catch!

@JerrySievert JerrySievert merged commit d344bbf into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 30, 2013
  1. Fix extra bracket in save.sql

    Admin authored
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 1 deletion.
  1. +0 −1  save.sql
View
1  save.sql
@@ -18,7 +18,6 @@ BOOLEAN AS $$
var update = plv8.prepare("UPDATE col_" + collection + " SET data = $1 WHERE col_" + collection + "_id = $2", [ 'json', 'character varying' ]);
res = update.execute([ data, id ]);
}
- }
}
if (res == 0) { // If it didnt affect anything, it must be a new row. Insert.
Something went wrong with that request. Please try again.