taql 0.2.6 → 0.2.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/CHANGELOG.md +4 -0
- data/README.md +13 -9
- data/lib/taql/version.rb +1 -1
- data/lib/taql.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b082583e00ba4c89bd7905a2c21226bc44145f559716a636c2f3e9d72ca6ee1b
|
4
|
+
data.tar.gz: 8b89177e2acdf34b5e176c9015493820e83a9cbb32a83f40a0b78e99fc669d0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3e64fe6ca82e0d5312f8f77db5e71b5b497b3dca55fab05fb86628e50c649f1d8e6e62b18f20f69970edb88567b2ad37db99ae22878da7601f3c734b6112c69
|
7
|
+
data.tar.gz: 23b6985df223ba7ef6cba06989ab74c24dd0f37c7abde78151dd83b8196db020058aa8ba911b41b505846b3ca4f882b7d8b854f5b7244a0f28174c09c2a615d7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
# Taql
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/taql`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
Taql is a lightweight Ruby gem that provides a convenient interface for executing SQL queries with beautifully formatted results. Whether you need a command-line SQL client for quick database exploration or a programmatic way to run queries within your Ruby application, Taql has you covered.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
10
|
-
|
11
7
|
Install the gem and add to the application's Gemfile by executing:
|
12
8
|
|
13
|
-
|
9
|
+
```sh
|
10
|
+
$ bundle add taql
|
11
|
+
```
|
14
12
|
|
15
13
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
16
14
|
|
17
|
-
|
15
|
+
```sh
|
16
|
+
$ gem install taql
|
17
|
+
```
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
@@ -76,14 +76,18 @@ The return value is a native PG::Result object, which supports mapping or extrac
|
|
76
76
|
| 20240815131806 |
|
77
77
|
| 20240815131747 |
|
78
78
|
+----------------+
|
79
|
-
=>
|
79
|
+
=> #<PG::Result:0x000000012ebf6a38 status=PGRES_TUPLES_OK ntuples=3 nfields=1 cmd_tuples=3>
|
80
80
|
```
|
81
81
|
|
82
82
|
## Development
|
83
83
|
|
84
84
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
85
85
|
|
86
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
86
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
87
|
+
|
88
|
+
## Releasing
|
89
|
+
|
90
|
+
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
87
91
|
|
88
92
|
## Contributing
|
89
93
|
|
data/lib/taql/version.rb
CHANGED
data/lib/taql.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative "taql/version"
|
|
5
5
|
module Taql
|
6
6
|
class Error < StandardError; end
|
7
7
|
|
8
|
-
def self.execute(query, options, connection: ActiveRecord::Base.connection)
|
8
|
+
def self.execute(query, options = {}, connection: ActiveRecord::Base.connection)
|
9
9
|
connection.execute(query).tap do |result|
|
10
10
|
if (results = result.entries).any?
|
11
11
|
$stdout.puts Table.new(results, markdown: options[:markdown])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ariel Rzezak
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
requirements: []
|
54
|
-
rubygems_version: 3.6.
|
54
|
+
rubygems_version: 3.6.9
|
55
55
|
specification_version: 4
|
56
56
|
summary: Tableize Rails SQL queries
|
57
57
|
test_files: []
|