pg_search 1.0.6 → 2.0.0

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.
@@ -1,11 +0,0 @@
1
- module PgSearch
2
- module Compatibility
3
- def self.build_quoted(string)
4
- if defined?(Arel::Nodes::Quoted)
5
- Arel::Nodes.build_quoted(string)
6
- else
7
- string
8
- end
9
- end
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- require "arel/visitors/depth_first"
2
-
3
- # Workaround for https://github.com/Casecommons/pg_search/issues/101
4
- # Based on the solution from https://github.com/ernie/squeel/issues/122
5
- Arel::Visitors::DepthFirst.class_eval do
6
- unless method_defined?(:visit_Arel_Nodes_InfixOperation)
7
- alias_method :visit_Arel_Nodes_InfixOperation, :binary
8
- end
9
- end
10
-
@@ -1,11 +0,0 @@
1
- require 'pg_search/migration/generator'
2
-
3
- module PgSearch
4
- module Migration
5
- class AssociatedAgainstGenerator < Generator
6
- def migration_name
7
- 'add_pg_search_associated_against_support_functions'.freeze
8
- end
9
- end
10
- end
11
- end
@@ -1,21 +0,0 @@
1
- class AddPgSearchAssociatedAgainstSupportFunctions < ActiveRecord::Migration
2
- def self.up
3
- say_with_time("Adding support functions for pg_search :associated_against") do
4
- if ActiveRecord::Base.connection.send(:postgresql_version) < 80400
5
- execute <<-'SQL'
6
- <%= read_sql_file "array_agg" %>
7
- SQL
8
- end
9
- end
10
- end
11
-
12
- def self.down
13
- say_with_time("Dropping support functions for pg_search :associated_against") do
14
- if ActiveRecord::Base.connection.send(:postgresql_version) < 80400
15
- execute <<-'SQL'
16
- <%= read_sql_file "uninstall_array_agg" %>
17
- SQL
18
- end
19
- end
20
- end
21
- end
data/sql/array_agg.sql DELETED
@@ -1,5 +0,0 @@
1
- CREATE AGGREGATE array_agg(anyelement) (
2
- SFUNC=array_append,
3
- STYPE=anyarray,
4
- INITCOND='{}'
5
- )
@@ -1 +0,0 @@
1
- DROP AGGREGATE array_agg(anyelement);
@@ -1 +0,0 @@
1
- DROP FUNCTION unnest(anyarray);
data/sql/unnest.sql DELETED
@@ -1,8 +0,0 @@
1
- CREATE OR REPLACE FUNCTION unnest(anyarray)
2
- RETURNS SETOF anyelement AS
3
- $BODY$
4
- SELECT $1[i] FROM
5
- generate_series(array_lower($1,1),
6
- array_upper($1,1)) i;
7
- $BODY$
8
- LANGUAGE 'sql' IMMUTABLE