lib/baza/driver/sqlite3.rb in baza-0.0.22 vs lib/baza/driver/sqlite3.rb in baza-0.0.23

- old
+ new

@@ -40,9 +40,21 @@ @conn = ::SQLite3::Database.open(@path) @conn.type_translation = false # Type translation is always done in the C ext for SQLite3 end end + def enable_foreign_key_support + return true if @foreign_key_support_enabled + + @db.query("PRAGMA foreign_keys = ON") + @foreign_key_support_enabled = true + true + end + + def foreign_key_support? + false + end + # Executes a query against the driver. def query(sql) @mutex_statement_reader.synchronize do return Baza::Driver::Sqlite3::Result.new(self, @conn.prepare(sql)) end