csv2sqlite 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff49a31a357c2e5acc7c7f79ac6b20e0d0dd5d72
4
- data.tar.gz: f3f4ad9cc5aebaee7fc47ef5f140fd071334127a
3
+ metadata.gz: 6237dc8a681326a22c8b0a1d595979507d978546
4
+ data.tar.gz: 93459f44e1bf4398413410b1f99d1645edef716c
5
5
  SHA512:
6
- metadata.gz: f2ac564da8ceca6fe8a45b7bcf47c64f9a57383e01494ff0f19016f70df492e58623461f0563a492766247e5308a352f6268eafa013e2b426d72fbbfe618ee59
7
- data.tar.gz: 4ccb998011ac61c2ae1c68abe43477fc6cd558698cdfa18bd5d33318cbb9d939cdcb4067d6f1cb700991998cd305cf3297ce1837b0d153b0e99bcacd19d1849f
6
+ metadata.gz: c015892416d7f56a59e2f90d9833767ef21ddf43a831543d00735baddc416e15e391f21337c986d0c3ab8ba827bbe7431638620f21cf00225080266b691b5945
7
+ data.tar.gz: bef203321ac61096841dc148232f82d1c50307c3d14b4ffc995230bf803b9be999770bcdb106ed3a128d9eec46eebaaed8e94e755df23974b4b2361d518f8ba5
data/bin/csv2sqlite CHANGED
@@ -21,6 +21,29 @@ development:
21
21
  }
22
22
  ActiveRecord::Base.configurations = YAML::load(config)
23
23
  ActiveRecord::Base.establish_connection('development')
24
+
25
+ if c = ::ActiveRecord::Base.connection
26
+ # see http://www.sqlite.org/pragma.html for details
27
+
28
+ # Page size of the database. The page size must be a power of two between 512 and 65536 inclusive
29
+
30
+ c.execute 'PRAGMA main.page_size=4096;'
31
+
32
+ # Suggested maximum number of database disk pages that SQLite will hold in memory at once per open database file
33
+ c.execute 'PRAGMA main.cache_size=10000;'
34
+
35
+ # Database connection locking-mode. The locking-mode is either NORMAL or EXCLUSIVE
36
+ c.execute 'PRAGMA main.locking_mode=EXCLUSIVE;'
37
+
38
+ # Setting of the "synchronous" flag, "NORMAL" means sync less often but still more than none
39
+ c.execute 'PRAGMA main.synchronous=NORMAL;'
40
+
41
+ # Journal mode for database, WAL=write-ahead log
42
+ puts c.execute 'PRAGMA main.journal_mode=WAL;'
43
+
44
+ # Storage location for temporary tables, indices, views, triggers
45
+ c.execute 'PRAGMA main.temp_store = MEMORY;'
46
+ end
24
47
  RESERVED_COLUMN_NAMES = ["abort", "action", "add", "after", "all", "alter", "analyze", "and", "as", "asc", "attach", "autoincrement", "before", "begin", "between", "by", "cascade", "case", "cast", "check", "collate", "column", "commit", "conflict", "constraint", "create", "cross", "current_date", "current_time", "current_timestamp", "database", "default", "deferrable", "deferred", "delete", "desc", "detach", "distinct", "drop", "each", "else", "end", "escape", "except", "exclusive", "exists", "explain", "fail", "for", "foreign", "from", "full", "glob", "group", "having", "if", "ignore", "immediate", "in", "index", "indexed", "initially", "inner", "insert", "instead", "intersect", "into", "is", "isnull", "join", "key", "left", "like", "limit", "match", "natural", "no", "not", "notnull", "null", "of", "offset", "on", "or", "order", "outer", "plan", "pragma", "primary", "query", "raise", "recursive", "references", "regexp", "reindex", "release", "rename", "replace", "restrict", "right", "rollback", "row", "savepoint", "select", "set", "table", "temp", "temporary", "then", "to", "transaction", "trigger", "union", "unique", "update", "using", "vacuum", "values", "view", "virtual", "when", "where", "with", "without"]
25
48
  csvs.each {|file|
26
49
  files = [{path: file, name: nil}]
@@ -1,3 +1,3 @@
1
1
  module Csv2sqlite
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csv2sqlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Brumm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-19 00:00:00.000000000 Z
11
+ date: 2014-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport