recordx_sqlite 0.2.5 → 0.2.6
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 +1 -1
- data.tar.gz.sig +0 -0
- data/lib/recordx_sqlite.rb +7 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bea30fa0ae7d919dc8589e30330249ea6e095aa7
|
4
|
+
data.tar.gz: 63f42ad1e7a55ca312af2de5c5617f1570c19810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0b83a05495a1fa7ed4d1fd89967f25a20337f90dde0931b93bd15e91e629a8955f227e77d661c7c31e41ccb786fab3e34c61b7f109d3d4a7893a6c17738d903
|
7
|
+
data.tar.gz: 6ad6164c430baebe6397357b71fc9c4e2108f4dc86f2a1fc9c026a373eec11e25cd840837b1aad770e0b14bb7678721999d17f4af5c51edde69ac3ae0dca1729
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
������h%a/���UE�%y#�:2���II��,ngx��5�dXي�_Z��,yJ��GR�)g�+= �DbMI�uq�pU�ժ�
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/recordx_sqlite.rb
CHANGED
@@ -30,6 +30,7 @@ class RecordxSqlite
|
|
30
30
|
end
|
31
31
|
|
32
32
|
@sql = sql || 'select * from ' + @table.to_s
|
33
|
+
@default_sql = @sql
|
33
34
|
|
34
35
|
@a = nil
|
35
36
|
|
@@ -39,6 +40,7 @@ class RecordxSqlite
|
|
39
40
|
# first if a record had recently been added since the recordset was loaded
|
40
41
|
#
|
41
42
|
def all()
|
43
|
+
@sql = @default_sql
|
42
44
|
query(@sql) unless @a
|
43
45
|
@a
|
44
46
|
end
|
@@ -76,6 +78,11 @@ class RecordxSqlite
|
|
76
78
|
def first(n=1)
|
77
79
|
query(@sql + ' LIMIT ' + n.to_s, cache: false)
|
78
80
|
end
|
81
|
+
|
82
|
+
def order(dir=:asc)
|
83
|
+
@sql += " ORDER BY #{@primary_key} #{dir.to_s.upcase}"
|
84
|
+
self
|
85
|
+
end
|
79
86
|
|
80
87
|
def query(sql=@sql, cache: true)
|
81
88
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|