Skip to content

Instantly share code, notes, and snippets.

@yanak
Created September 29, 2014 11:10
Show Gist options
  • Save yanak/afffa12e6406887fad6a to your computer and use it in GitHub Desktop.
Save yanak/afffa12e6406887fad6a to your computer and use it in GitHub Desktop.
いい感じのSQlite3
def execute(sql, *args)
begin
ps = @db.prepare(sql)
ps.bind_params *args
res = ps.execute
rescue => e
raise(e)
ensure
ps.close
end
return res
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment