recordx_sqlite 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/recordx_sqlite.rb +14 -0
- data.tar.gz.sig +0 -0
- metadata +4 -4
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d43fa3a3d3ec544a14841f54971aa63226b0c34
|
4
|
+
data.tar.gz: 994fa803b3ada9d6d4da3702363d75b5d6f90b55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07ac1b311e412d966064286d56e39bdcf95813be9cba0c3528f39c2e60572bdb25faffbb76708dd367a9598ef12a96495a21c6ab79a1803800e4c488a8ec2aef
|
7
|
+
data.tar.gz: 132384723b69a4ad2cb1b5b863c234455daef4d2845f8a658c2479dfef3cee2f697b2cd77b2a307187d5b9b8dbf0472045eb67bf0fa78b511e4890255d42b058
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/recordx_sqlite.rb
CHANGED
@@ -19,11 +19,25 @@ class RecordxSqlite
|
|
19
19
|
|
20
20
|
end
|
21
21
|
|
22
|
+
# note: when using method all() you will need to execute method refresh()
|
23
|
+
# first if a record had recently been added since the recordset was loaded
|
24
|
+
#
|
22
25
|
def all()
|
23
26
|
query(@sql) unless @a
|
24
27
|
@a
|
25
28
|
end
|
26
29
|
|
30
|
+
def create(h={})
|
31
|
+
|
32
|
+
fields = h.keys
|
33
|
+
values = h.values
|
34
|
+
|
35
|
+
sql = "INSERT INTO #{@table} (#{fields.join(', ')})
|
36
|
+
VALUES (#{(['?'] * fields.length).join(', ')})"
|
37
|
+
|
38
|
+
@db.execute(sql, values)
|
39
|
+
end
|
40
|
+
|
27
41
|
def find(id)
|
28
42
|
query(@sql) unless @a
|
29
43
|
@a.find {|x| x.method(@primary_key).call == id}
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recordx_sqlite
|
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
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
pewreBQ0QCPuPbV1FPlyX5N5qsGIMHFIYqUlaykOA8156Y6fbIbqQsLwxaSr8WkD
|
32
32
|
eojajR/fTTvliw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sqlite3
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.4.0
|
76
76
|
description:
|
77
|
-
email: james@
|
77
|
+
email: james@jamesrobertson.eu
|
78
78
|
executables: []
|
79
79
|
extensions: []
|
80
80
|
extra_rdoc_files: []
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.6.8
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: RecordX-SQLite is an object relational mapper primarily designed for updating
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
��MeR��A[�*��}���.
|
2
|
+
ߵu��*۲
|