sequel-pg-trgm 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01a2cad5f96f7d809c552a4e954a6f41846093d0
4
- data.tar.gz: 9d415dec033c312b37f0a1c3b3d70b5504f855ed
3
+ metadata.gz: bf9f322859fe86be7c5e55d3a2969fb00c6d5db4
4
+ data.tar.gz: 9e97487d78860ca00f85002b5c3692e0b7dd8fdb
5
5
  SHA512:
6
- metadata.gz: 4b74774c66b189c7809634e38570182bc1b50c2402796d7f4a9ed311f8fc7e17f8ee06f99c4b6c5dd612c210e52bc77aae8b9d4c8e759fde92ed3bb7c198514e
7
- data.tar.gz: 572280ed5b31a1189c3ce26109a7bf1aef8ce2ef2bfaa6135297447f8e59d7a95d44dfd10d39fb08510272e24a52208fb73640fb3a81b201f3600bab10d2f9c8
6
+ metadata.gz: 646ddc315c725dc7d459333e40fb635e35795f7c59ec33d4519d106807f8023f68abc269017da5aadd04aff9de4a6e9b12b83986b3384f9328ba4d381c60b380
7
+ data.tar.gz: 2a08ae33e26c5e4d4e658d5b758e693bfc39150cb0892efd4c3a733746cfb58a8a24c8c0d66b58e37f0813243e3befc71199adfe7a4b0393b631be310b084745
@@ -1,16 +1,6 @@
1
1
  module Sequel
2
2
  module Postgres
3
3
  module PgTrgm
4
- def add_extension(name)
5
- quoted_name = quote_identifier(name) if name
6
- self.run "CREATE EXTENSION IF NOT EXISTS #{quoted_name};"
7
- end
8
-
9
- def drop_extension(name)
10
- quoted_name = quote_identifier(name) if name
11
- self.run "DROP EXTENSION IF EXISTS #{quoted_name};"
12
- end
13
-
14
4
  def add_pg_trgm(table, column, op={})
15
5
  self.run "CREATE INDEX #{table}_#{column}_trgm_index ON #{table} USING gist (#{column} gist_trgm_ops);"
16
6
  end
@@ -3,7 +3,7 @@ module Sequel
3
3
  module PgTrgm
4
4
  module DatasetMethods
5
5
  def text_search(column, query)
6
- where("#{column} % #{Sequel::Model.db.literal query}").order_by{ Sequel.desc(similarity(column, query)) }
6
+ where("? % ?", column, query).reverse_order{ similarity(column, query) }
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-pg-trgm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Henke
@@ -9,7 +9,49 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2014-04-13 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sequel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>'
18
+ - !ruby/object:Gem::Version
19
+ version: '3.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>'
25
+ - !ruby/object:Gem::Version
26
+ version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '2.14'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '2.14'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pg
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '0.17'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '0.17'
13
55
  description:
14
56
  email: mitchh23@gmail.com
15
57
  executables: []
@@ -19,7 +61,8 @@ files:
19
61
  - lib/sequel/extensions/pg_trgm.rb
20
62
  - lib/sequel/plugins/pg_trgm.rb
21
63
  homepage: https://github.com/mitchellhenke/sequel-pg-trgm
22
- licenses: []
64
+ licenses:
65
+ - MIT
23
66
  metadata: {}
24
67
  post_install_message:
25
68
  rdoc_options: []