Last active
April 22, 2016 05:14
-
-
Save rla/6225210504d0152cf072198efdefc415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create_warehouse(t, account_id) { | |
var warehouse = { | |
account_id: account_id, | |
name: 'Default warehouse', | |
type: 'local', | |
is_default: true | |
}; | |
var sql = 'insert into warehouse(account_id, name, type, is_default)' + | |
' values (${account_id}, ${name}, ${type}, ${is_default}) returning id'; | |
return t.one(sql, warehouse); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment