baza 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8369c9293d5a5bc7d773f2d0b433851dfbfd7357
4
- data.tar.gz: 536bc2b56f0483e5df1f778552651afa91f0cce1
3
+ metadata.gz: a140880f4a29b160732e615d71edcbef2067558f
4
+ data.tar.gz: 18778633d92ec1fd6a90ebe77b070b07b4955698
5
5
  SHA512:
6
- metadata.gz: 2ace04b5dc91c6379d5764cd6229c6519dfec9aff794778a6e1192359b7d3de68b3006d6be48895fa633982762d440fb4ef6908d316a6891bd9c15828d391e4b
7
- data.tar.gz: 3dd8ab58ffc4e7bef9d7439bb57df231c03f81ed7b6d7a9a754973d4ce94326f266e73b60de82489e8622d4998d6850bccf4db2c02f8a6dd1e7eb7e0a2d000ed
6
+ metadata.gz: 684f412f2eb01b8f400b8fe3ba2b082a67fc606612d569140615fc38dbe05e0e899f2555e8fea9e1aeee804404b222be71049114153aadbe7d0e804ee6cf60b8
7
+ data.tar.gz: f5738e3752f928fd38b705149fc03c465283dfc302e8b4d7a4b734d811f0b02d6566d22ffcd95b8d7c025e267167d79a4c8d9e2eff87a89b6fff22076eb7d7d0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.22
1
+ 0.0.23
data/baza.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: baza 0.0.22 ruby lib
5
+ # stub: baza 0.0.23 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "baza".freeze
9
- s.version = "0.0.22"
9
+ s.version = "0.0.23"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
@@ -15,6 +15,10 @@ class Baza::BaseSqlDriver
15
15
  @sep_index = "`"
16
16
  end
17
17
 
18
+ def foreign_key_support?
19
+ true
20
+ end
21
+
18
22
  def escape(string)
19
23
  string.to_s.gsub(/([\0\n\r\032\'\"\\])/) do
20
24
  case Regexp.last_match(1)
@@ -42,6 +42,18 @@ class Baza::Driver::Sqlite3 < Baza::BaseSqlDriver
42
42
  end
43
43
  end
44
44
 
45
+ def enable_foreign_key_support
46
+ return true if @foreign_key_support_enabled
47
+
48
+ @db.query("PRAGMA foreign_keys = ON")
49
+ @foreign_key_support_enabled = true
50
+ true
51
+ end
52
+
53
+ def foreign_key_support?
54
+ false
55
+ end
56
+
45
57
  # Executes a query against the driver.
46
58
  def query(sql)
47
59
  @mutex_statement_reader.synchronize do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baza
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Johansen