sqlite_ext 0.2.0 → 0.2.1
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/README.md +2 -2
- data/lib/sqlite_ext.rb +1 -1
- data/lib/sqlite_ext/version.rb +1 -1
- data/sqlite_ext.gemspec +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: 1fd58c26fad277700872dcd07dc711f863d10baf
|
4
|
+
data.tar.gz: 65442f49f6525fa2aa667448a9bf37c49003f45e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d8eab54e2760c6465549c1483afc50b40b79e43928affa8f63dbc568df244b46b6173825b263d7214006159c97b41b9025b366c2bc7d9833900b8993aaedaee
|
7
|
+
data.tar.gz: 0be909542e9a433bd107aa538f720b0370b00716bc775d86b005006905ec85b56d22850059f1c5a4f07c72440492738ef39e69d8589d86bd3f868fec901a24c7
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# SqliteExt
|
2
2
|
|
3
3
|
Provides a convenient way of writing functions in Ruby that can
|
4
|
-
be called from
|
4
|
+
be called from within SQLite queries through the SQLite3 gem.
|
5
5
|
|
6
6
|
Although it is already possible to write ruby code for functions
|
7
7
|
that can be called from within SQL queries using SQLite via the
|
@@ -37,7 +37,7 @@ Or install it yourself as:
|
|
37
37
|
|
38
38
|
## Usage
|
39
39
|
|
40
|
-
SqliteExt.register_function('sqrt'
|
40
|
+
SqliteExt.register_function('sqrt'){ |x| Math.sqrt(x) }
|
41
41
|
|
42
42
|
SQLite3::Database.new 'data.db' do |db|
|
43
43
|
puts db.execute("SELECT sqrt(25)")[0][0]
|
data/lib/sqlite_ext.rb
CHANGED
@@ -22,7 +22,7 @@ module SqliteExt
|
|
22
22
|
#
|
23
23
|
# Example:
|
24
24
|
#
|
25
|
-
# SqliteExt.register_function('sqrt'
|
25
|
+
# SqliteExt.register_function('sqrt'){ |x| Math.sqrt(x) }
|
26
26
|
#
|
27
27
|
# SQLite3::Database.new 'data.db' do |db|
|
28
28
|
# puts db.execute("SELECT sqrt(25)")[0][0]
|
data/lib/sqlite_ext/version.rb
CHANGED
data/sqlite_ext.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["stevej@stevej.name"]
|
11
11
|
|
12
12
|
spec.summary = "Provides a convenient way of writing functions in Ruby that can " \
|
13
|
-
"be called from
|
13
|
+
"be called from within SQLite queries through the SQLite3 gem."
|
14
14
|
spec.homepage = "https://github.com/stevecj/sqlite_ext"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlite_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Jorgensen
|
@@ -113,5 +113,5 @@ rubygems_version: 2.5.1
|
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Provides a convenient way of writing functions in Ruby that can be called
|
116
|
-
from
|
116
|
+
from within SQLite queries through the SQLite3 gem.
|
117
117
|
test_files: []
|