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 +4 -4
- data/bin/csv2sqlite +23 -0
- data/lib/csv2sqlite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6237dc8a681326a22c8b0a1d595979507d978546
|
4
|
+
data.tar.gz: 93459f44e1bf4398413410b1f99d1645edef716c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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}]
|
data/lib/csv2sqlite/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|