bel-search-sqlite 0.4.0.beta1 → 0.4.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +1 -1
- data/CHANGELOG.md +1 -1
- data/lib/bel/resource/search/plugins/sqlite/sqlite3.rb +6 -6
- data/lib/bel/resource/search/plugins/sqlite/sqlite3_template.erb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690b801e9a3e10c23a958aaa15e8f5fac222281c
|
4
|
+
data.tar.gz: 63736018617e7b7cac47dcbeb395677f8bd47ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dd18bc6dcb53cad44fbc7acdb371e7064c2c548e26dd489ae7ab9d8abbdf8574aaf8362727c0fb0abc27ffdbe3921449ba40ad25e3689317517549aa8356b65
|
7
|
+
data.tar.gz: 0d68b9f8981d36a63375f3a499eb42c4a5f25aeca5925525ed51c065bf0f84c23e28c0e7af6f76239a74b5d87f4bfddc60aaa9cf74a8131a93d635d13fb6b9c3
|
data/.gemspec
CHANGED
data/CHANGELOG.md
CHANGED
@@ -24,23 +24,23 @@ module BEL::Resource::Search::Plugins
|
|
24
24
|
# @see BEL::Resource::Search::API#search
|
25
25
|
def search(query_expression, concept_type = nil, scheme_uri = nil, species = nil, options = {})
|
26
26
|
# required SQL parameters
|
27
|
-
|
28
|
-
start = (options.delete(:start) || 0).to_i
|
29
|
-
size = options.delete(:size) || -1
|
27
|
+
size = options.delete(:size) || -1
|
30
28
|
if size.to_i.zero?
|
31
29
|
fail ArgumentError.new(":size is zero")
|
32
30
|
end
|
33
31
|
|
34
32
|
# optional SQL parameters
|
35
|
-
|
33
|
+
params = {
|
34
|
+
:match => query_expression.encode('UTF-8'),
|
35
|
+
:start => (options.delete(:start) || 0).to_i,
|
36
|
+
:size => size,
|
36
37
|
:concept_type => (concept_type ? concept_type.to_s.encode('UTF-8') : nil),
|
37
38
|
:scheme_uri => (scheme_uri ? scheme_uri.to_s.encode('UTF-8') : nil),
|
38
39
|
:species => (species ? species.to_s.encode('UTF-8') : nil),
|
39
40
|
}
|
40
|
-
options.keep_if { |key, value| value != nil }
|
41
41
|
|
42
42
|
query = QUERY_TEMPLATE.result(binding)
|
43
|
-
enum = @db.fetch(query,
|
43
|
+
enum = @db.fetch(query, params)
|
44
44
|
|
45
45
|
if enum.respond_to? :lazy
|
46
46
|
enum = enum.lazy
|
metadata
CHANGED
@@ -1,46 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bel-search-sqlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anthony Bargnesi
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: sequel
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - '='
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: 4.28.0
|
20
|
-
|
19
|
+
name: sequel
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 4.28.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: sqlite3
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - '='
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: 1.3.11
|
34
|
-
|
33
|
+
name: sqlite3
|
35
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.3.11
|
41
|
-
description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite
|
42
|
-
to search annotation and namespace values. Built to run on MRI to take advantage
|
43
|
-
of C extensions. "
|
41
|
+
description: " A resource search plugin for bel.rb that uses FTS tables in Sqlite\
|
42
|
+
\ to search annotation and namespace values. Built to run on MRI to take advantage\
|
43
|
+
\ of C extensions. "
|
44
44
|
email:
|
45
45
|
- abargnesi@selventa.com
|
46
46
|
executables: []
|
@@ -106,10 +106,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: 1.3.1
|
108
108
|
requirements: []
|
109
|
-
rubyforge_project:
|
110
|
-
rubygems_version: 2.4.
|
111
|
-
signing_key:
|
109
|
+
rubyforge_project:
|
110
|
+
rubygems_version: 2.4.8
|
111
|
+
signing_key:
|
112
112
|
specification_version: 4
|
113
113
|
summary: Resource search plugin for bel.rb using Sqlite FTS.
|
114
114
|
test_files: []
|
115
|
-
has_rdoc:
|
115
|
+
has_rdoc:
|