csv_to_sqlite3 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +8 -18
- data/csv_to_sqlite3.gemspec +2 -2
- data/lib/csv_to_sqlite/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6054545a778a1f66aaf4f1a21d27a649495077eeb57156bc1c997fb35f4da2cd
|
4
|
+
data.tar.gz: 806c76397accf1f4dd054e690ef033415d4fa8263bc8ca345057c116afdbe8e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82dea9f3753586ba249c11d820644086e44b8303333db6a06c381a02892d1f332c88f1031d084ac93c235757aa24dba8d7ddd72f3ac805a22f2501cb8507a53c
|
7
|
+
data.tar.gz: 8f6623cb0bea64446b43ddc5421fd1fce24ef0c18413851ccc80c65ae5ca04dd6a734814276cb9b5d5960203cbda59d2306c399fb1a11cac4b732da9b2a9559e
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,28 +1,18 @@
|
|
1
|
-
#
|
1
|
+
# CsvToSqlite3
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
CsvToSqlite3 is a gem that aims to work as a executable like rake or bundler, it servs as a Sqlite3 database generator from csv files. It is used to create and insert all data from one or more csv files to the same Sqlite3 database.
|
4
|
+
The ideia comes from a specific cenario when I needed to run complex sql queries on a huge database, and once I was afraid to run it directly in prolduction and it impacts in the operation I chose to run simples selects (select * from some_table when created_at > some_date) from each table used on my query, export to csv files than create a specific ruby script that create a sqlite3 database and run the inserts, thereby i can run any havy query on my local computer without generate any impact in the operation.
|
5
|
+
Once this cenario is quite common I decided to rewrite the script to work with any csv file exported from any table.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'csv_to_sqlite'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
16
|
-
|
17
|
-
$ bundle install
|
18
|
-
|
19
|
-
Or install it yourself as:
|
9
|
+
Installed with gem:
|
20
10
|
|
21
|
-
$ gem install
|
11
|
+
$ gem install csv_to_sqlite3
|
22
12
|
|
23
13
|
## Usage
|
24
14
|
|
25
|
-
|
15
|
+
Once the gem is installed it is aviable the command "csv_to_sqlite", to generate a new database you need to run on terminal "csv_to_sqlite path/to/file.csv'". It will create a file named data.sqlite3 and create a table with name equal to file name, case the table already exists it will only insert all data from this file.
|
26
16
|
|
27
17
|
## Development
|
28
18
|
|
@@ -32,7 +22,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
22
|
|
33
23
|
## Contributing
|
34
24
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
25
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/joaofelipe1294/csv_to_sqlite3.
|
36
26
|
|
37
27
|
|
38
28
|
## License
|
data/csv_to_sqlite3.gemspec
CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |spec|
|
|
6
6
|
spec.authors = ["joaofelipelopes"]
|
7
7
|
spec.email = ["joaofelipe1294@gmail.com"]
|
8
8
|
|
9
|
-
spec.summary = %q{An easy way to convert a csv file into
|
10
|
-
spec.description = %q{Add a
|
9
|
+
spec.summary = %q{An easy way to convert a csv file into SQLite3 database.}
|
10
|
+
spec.description = %q{Add the executable "csv_to_sqlite" to your terminal, wich is used to create a SQLite3 database with all data from a csv file by running "csv_to_sqlite file.csv". It was developed to be used as a command line.}
|
11
11
|
spec.homepage = "https://github.com/joaofelipe1294/csv_to_sqlite3"
|
12
12
|
spec.license = "MIT"
|
13
13
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
metadata
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: csv_to_sqlite3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joaofelipelopes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Add
|
13
|
+
description: Add the executable "csv_to_sqlite" to your terminal, wich is used to
|
14
|
+
create a SQLite3 database with all data from a csv file by running "csv_to_sqlite
|
15
|
+
file.csv". It was developed to be used as a command line.
|
14
16
|
email:
|
15
17
|
- joaofelipe1294@gmail.com
|
16
18
|
executables:
|
@@ -63,5 +65,5 @@ requirements: []
|
|
63
65
|
rubygems_version: 3.0.3
|
64
66
|
signing_key:
|
65
67
|
specification_version: 4
|
66
|
-
summary: An easy way to convert a csv file into
|
68
|
+
summary: An easy way to convert a csv file into SQLite3 database.
|
67
69
|
test_files: []
|