309 lines
8.5 KiB
Ruby
Generated
309 lines
8.5 KiB
Ruby
Generated
# typed: true
|
|
|
|
# DO NOT EDIT MANUALLY
|
|
# This is an autogenerated file for types exported from the `neighbor` gem.
|
|
# Please instead update this file by running `bin/tapioca gem neighbor`.
|
|
|
|
|
|
# source://neighbor//lib/neighbor/mysql.rb#1
|
|
module Neighbor; end
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#2
|
|
class Neighbor::Attribute < ::ActiveModel::Type::Value
|
|
# @return [Attribute] a new instance of Attribute
|
|
#
|
|
# source://neighbor//lib/neighbor/attribute.rb#5
|
|
def initialize(cast_type:, model:, type:, attribute_name:); end
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#3
|
|
def cast(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#3
|
|
def deserialize(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#3
|
|
def serialize(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#3
|
|
def type(*_arg0, **_arg1, &_arg2); end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#14
|
|
def cast_value(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/attribute.rb#18
|
|
def new_cast_type; end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor.rb#16
|
|
class Neighbor::Error < ::StandardError; end
|
|
|
|
# source://neighbor//lib/neighbor/railtie.rb#11
|
|
module Neighbor::GeneratedAttribute
|
|
# source://neighbor//lib/neighbor/railtie.rb#12
|
|
def parse_type_and_options(type, *_arg1, **_arg2); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/model.rb#2
|
|
module Neighbor::Model
|
|
# source://neighbor//lib/neighbor/model.rb#3
|
|
def has_neighbors(*attribute_names, dimensions: T.unsafe(nil), normalize: T.unsafe(nil), type: T.unsafe(nil)); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/mysql.rb#2
|
|
module Neighbor::MySQL
|
|
class << self
|
|
# source://neighbor//lib/neighbor/mysql.rb#3
|
|
def initialize!; end
|
|
end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/mysql.rb#23
|
|
module Neighbor::MySQL::RegisterTypes
|
|
# source://neighbor//lib/neighbor/mysql.rb#24
|
|
def initialize_type_map(m); end
|
|
|
|
# source://neighbor//lib/neighbor/mysql.rb#29
|
|
def register_vector_type(m); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#2
|
|
class Neighbor::NormalizedAttribute < ::ActiveModel::Type::Value
|
|
# @return [NormalizedAttribute] a new instance of NormalizedAttribute
|
|
#
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#5
|
|
def initialize(cast_type:, model:, attribute_name:); end
|
|
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#11
|
|
def cast(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#3
|
|
def deserialize(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#3
|
|
def serialize(*_arg0, **_arg1, &_arg2); end
|
|
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#3
|
|
def type(*_arg0, **_arg1, &_arg2); end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/normalized_attribute.rb#17
|
|
def cast_value(*_arg0, **_arg1, &_arg2); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/postgresql.rb#2
|
|
module Neighbor::PostgreSQL
|
|
class << self
|
|
# source://neighbor//lib/neighbor/postgresql.rb#3
|
|
def initialize!; end
|
|
end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/postgresql.rb#24
|
|
module Neighbor::PostgreSQL::RegisterTypes
|
|
# source://neighbor//lib/neighbor/postgresql.rb#25
|
|
def initialize_type_map(m = T.unsafe(nil)); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/railtie.rb#2
|
|
class Neighbor::Railtie < ::Rails::Railtie; end
|
|
|
|
# source://neighbor//lib/neighbor/reranking.rb#2
|
|
module Neighbor::Reranking
|
|
class << self
|
|
# source://neighbor//lib/neighbor/reranking.rb#3
|
|
def rrf(first_ranking, *rankings, k: T.unsafe(nil)); end
|
|
end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/sqlite.rb#2
|
|
module Neighbor::SQLite
|
|
class << self
|
|
# note: this is a public API (unlike PostgreSQL and MySQL)
|
|
#
|
|
# source://neighbor//lib/neighbor/sqlite.rb#4
|
|
def initialize!; end
|
|
end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/sqlite.rb#18
|
|
module Neighbor::SQLite::InstanceMethods
|
|
# source://neighbor//lib/neighbor/sqlite.rb#19
|
|
def configure_connection; end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#2
|
|
class Neighbor::SparseVector
|
|
# @return [SparseVector] a new instance of SparseVector
|
|
#
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#7
|
|
def initialize(value, dimensions = T.unsafe(nil)); end
|
|
|
|
# Returns the value of attribute dimensions.
|
|
#
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#3
|
|
def dimensions; end
|
|
|
|
# Returns the value of attribute indices.
|
|
#
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#3
|
|
def indices; end
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#25
|
|
def to_a; end
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#21
|
|
def to_s; end
|
|
|
|
# Returns the value of attribute values.
|
|
#
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#3
|
|
def values; end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#42
|
|
def from_array(arr); end
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#35
|
|
def from_hash(data, dimensions); end
|
|
|
|
class << self
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#56
|
|
def from_text(string); end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#70
|
|
def from_parts(dimensions, indices, values); end
|
|
end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/sparse_vector.rb#5
|
|
Neighbor::SparseVector::NO_DEFAULT = T.let(T.unsafe(nil), Object)
|
|
|
|
# source://neighbor//lib/neighbor/type/cube.rb#2
|
|
module Neighbor::Type; end
|
|
|
|
# source://neighbor//lib/neighbor/type/cube.rb#3
|
|
class Neighbor::Type::Cube < ::ActiveModel::Type::Value
|
|
# source://neighbor//lib/neighbor/type/cube.rb#8
|
|
def serialize(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/cube.rb#4
|
|
def type; end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/type/cube.rb#22
|
|
def cast_value(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/cube.rb#38
|
|
def serialize_point(value); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/type/halfvec.rb#3
|
|
class Neighbor::Type::Halfvec < ::ActiveModel::Type::Value
|
|
# source://neighbor//lib/neighbor/type/halfvec.rb#8
|
|
def serialize(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/halfvec.rb#4
|
|
def type; end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/type/halfvec.rb#17
|
|
def cast_value(value); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/type/mysql_vector.rb#3
|
|
class Neighbor::Type::MysqlVector < ::ActiveModel::Type::Binary
|
|
# source://neighbor//lib/neighbor/type/mysql_vector.rb#15
|
|
def deserialize(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/mysql_vector.rb#8
|
|
def serialize(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/mysql_vector.rb#4
|
|
def type; end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/type/mysql_vector.rb#22
|
|
def cast_value(value); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/type/sparsevec.rb#3
|
|
class Neighbor::Type::Sparsevec < ::ActiveModel::Type::Value
|
|
# source://neighbor//lib/neighbor/type/sparsevec.rb#8
|
|
def serialize(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/sparsevec.rb#4
|
|
def type; end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/type/sparsevec.rb#17
|
|
def cast_value(value); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/type/vector.rb#3
|
|
class Neighbor::Type::Vector < ::ActiveModel::Type::Value
|
|
# source://neighbor//lib/neighbor/type/vector.rb#8
|
|
def serialize(value); end
|
|
|
|
# source://neighbor//lib/neighbor/type/vector.rb#4
|
|
def type; end
|
|
|
|
private
|
|
|
|
# source://neighbor//lib/neighbor/type/vector.rb#17
|
|
def cast_value(value); end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#2
|
|
module Neighbor::Utils
|
|
class << self
|
|
# source://neighbor//lib/neighbor/utils.rb#50
|
|
def adapter(model); end
|
|
|
|
# @return [Boolean]
|
|
#
|
|
# source://neighbor//lib/neighbor/utils.rb#46
|
|
def array?(value); end
|
|
|
|
# @raise [Error]
|
|
#
|
|
# source://neighbor//lib/neighbor/utils.rb#33
|
|
def normalize(value, column_info:); end
|
|
|
|
# @return [Boolean]
|
|
#
|
|
# source://neighbor//lib/neighbor/utils.rb#192
|
|
def normalize_required?(adapter, column_type); end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#74
|
|
def operator(adapter, column_type, distance); end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#158
|
|
def order(adapter, type, operator, quoted_attribute, query); end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#61
|
|
def type(adapter, column_type); end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#23
|
|
def validate(value, dimensions:, type:, adapter:); end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#3
|
|
def validate_dimensions(value, type, expected, adapter); end
|
|
|
|
# source://neighbor//lib/neighbor/utils.rb#12
|
|
def validate_finite(value, type); end
|
|
end
|
|
end
|
|
|
|
# source://neighbor//lib/neighbor/version.rb#2
|
|
Neighbor::VERSION = T.let(T.unsafe(nil), String)
|