Method: MiniSql::Sqlite::Connection#exec
- Defined in:
- lib/mini_sql/sqlite/connection.rb
#exec(sql, *params) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/mini_sql/sqlite/connection.rb', line 41 def exec(sql, *params) start = raw_connection.total_changes r = run(sql, params) # this is not safe for multithreading, also for DELETE from TABLE will return # incorrect data if r.length > 0 r.length else raw_connection.total_changes - start end end |