Bigtable v0.7.0 Bigtable.RowFilter View Source
Provides functions for creating Google.Bigtable.V2.RowFilter and applying them to a Google.Bigtable.V2.ReadRowsRequest or Google.Bigtable.V2.RowFilter.Chain.
Link to this section Summary
Functions
Creates an apply label transformer Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.apply_label_transformer("label")
%Google.Bigtable.V2.RowFilter{
filter: {:apply_label_transformer, "label"}
}
Adds an apply label transformer Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest
Creates a block all Google.Bigtable.V2.RowFilter
Adds a block all Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a cells per column Google.Bigtable.V2.RowFilter
Adds a cells per column Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest
Creates a cells per row Google.Bigtable.V2.RowFilter
Adds a cells per row Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest
Creates a cells per row offset Google.Bigtable.V2.RowFilter
Adds a cells per row offset Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest
Adds a Google.Bigtable.V2.RowFilter chain to a Google.Bigtable.V2.ReadRowsRequest given a list of Google.Bigtable.V2.RowFilter
Creates a family name regex Google.Bigtable.V2.RowFilter
Adds a column qualifier regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a column range Google.Bigtable.V2.RowFilter
Adds a column range Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a family name regex Google.Bigtable.V2.RowFilter
Adds a family name regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a pass all Google.Bigtable.V2.RowFilter
Adds a pass all Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a row key regex Google.Bigtable.V2.RowFilter
Adds a row key regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a strip value transformer Google.Bigtable.V2.RowFilter
Adds a strip value transformer Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a timestamp range Google.Bigtable.V2.RowFilter
Adds a timestamp range Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Creates a value regex Google.Bigtable.V2.RowFilter
Adds a value regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest
Link to this section Types
column_range() View Source
Link to this section Functions
apply_label_transformer(label)
View Source
apply_label_transformer(binary()) :: Google.Bigtable.V2.RowFilter.t()
apply_label_transformer(binary()) :: Google.Bigtable.V2.RowFilter.t()
Creates an apply label transformer Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.apply_label_transformer("label")
%Google.Bigtable.V2.RowFilter{
filter: {:apply_label_transformer, "label"}
}
apply_label_transformer(request, label)
View Source
apply_label_transformer(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
apply_label_transformer(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds an apply label transformer Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.apply_label_transformer("label")
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:apply_label_transformer, "label"}
}
block_all()
View Source
block_all() :: Google.Bigtable.V2.RowFilter.t()
block_all() :: Google.Bigtable.V2.RowFilter.t()
Creates a block all Google.Bigtable.V2.RowFilter.
Does not match any cells, regardless of input. Useful for temporarily disabling just part of a filter.
Examples
iex> Bigtable.RowFilter.block_all()
%Google.Bigtable.V2.RowFilter{
filter: {:block_all_filter, true}
}
block_all(request)
View Source
block_all(Google.Bigtable.V2.ReadRowsRequest.t()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
block_all(Google.Bigtable.V2.ReadRowsRequest.t()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a block all Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.block_all()
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:block_all_filter, true}
}
cells_per_column(limit)
View Source
cells_per_column(integer()) :: Google.Bigtable.V2.RowFilter.t()
cells_per_column(integer()) :: Google.Bigtable.V2.RowFilter.t()
Creates a cells per column Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.cells_per_column(2)
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_column_limit_filter, 2}
}
cells_per_column(request, limit)
View Source
cells_per_column(Google.Bigtable.V2.ReadRowsRequest.t(), integer()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
cells_per_column(Google.Bigtable.V2.ReadRowsRequest.t(), integer()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a cells per column Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.cells_per_column(2)
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_column_limit_filter, 2}
}
cells_per_row(limit)
View Source
cells_per_row(integer()) :: Google.Bigtable.V2.RowFilter.t()
cells_per_row(integer()) :: Google.Bigtable.V2.RowFilter.t()
Creates a cells per row Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.cells_per_row(2)
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_row_limit_filter, 2}
}
cells_per_row(request, limit)
View Source
cells_per_row(Google.Bigtable.V2.ReadRowsRequest.t(), integer()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
cells_per_row(Google.Bigtable.V2.ReadRowsRequest.t(), integer()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a cells per row Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.cells_per_row(2)
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_row_limit_filter, 2}
}
cells_per_row_offset(offset)
View Source
cells_per_row_offset(integer()) :: Google.Bigtable.V2.RowFilter.t()
cells_per_row_offset(integer()) :: Google.Bigtable.V2.RowFilter.t()
Creates a cells per row offset Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.cells_per_row_offset(2)
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_row_offset_filter, 2}
}
cells_per_row_offset(request, offset)
View Source
cells_per_row_offset(Google.Bigtable.V2.ReadRowsRequest.t(), integer()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
cells_per_row_offset(Google.Bigtable.V2.ReadRowsRequest.t(), integer()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a cells per row offset Google.Bigtable.V2.RowFilter to a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.cells_per_row_offset(2)
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_row_offset_filter, 2}
}
chain(request, filters)
View Source
chain(Google.Bigtable.V2.ReadRowsRequest.t(), [Google.Bigtable.V2.RowFilter.t()]) ::
Google.Bigtable.V2.ReadRowsRequest.t()
chain(Google.Bigtable.V2.ReadRowsRequest.t(), [Google.Bigtable.V2.RowFilter.t()]) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a Google.Bigtable.V2.RowFilter chain to a Google.Bigtable.V2.ReadRowsRequest given a list of Google.Bigtable.V2.RowFilter.
Examples
iex> filters = [Bigtable.RowFilter.cells_per_column(2), Bigtable.RowFilter.row_key_regex("^Test#w+")]
iex> request = Bigtable.ReadRows.build("table") |> Bigtable.RowFilter.chain(filters)
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:chain,
%Google.Bigtable.V2.RowFilter.Chain{
filters: [
%Google.Bigtable.V2.RowFilter{
filter: {:cells_per_column_limit_filter, 2}
},
%Google.Bigtable.V2.RowFilter{
filter: {:row_key_regex_filter, "^Test#w+"}
}
]
}}
}
column_qualifier_regex(regex)
View Source
column_qualifier_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
column_qualifier_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
Creates a family name regex Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.column_qualifier_regex("^testColumn$")
%Google.Bigtable.V2.RowFilter{
filter: {:column_qualifier_regex_filter, "^testColumn$"}
}
column_qualifier_regex(request, regex)
View Source
column_qualifier_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
column_qualifier_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a column qualifier regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.column_qualifier_regex("^testColumn$")
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:column_qualifier_regex_filter, "^testColumn$"}
}
column_range(family_name, range) View Source
Creates a column range Google.Bigtable.V2.RowFilter.
Column range should be provided in the format {start, end} or {start, end, inclusive}.
Defaults to inclusive start and end column qualifiers.
Examples
iex> range = {"column2", "column4"}
iex> Bigtable.RowFilter.column_range("family", range)
%Google.Bigtable.V2.RowFilter{
filter: {
:column_range_filter,
%Google.Bigtable.V2.ColumnRange{
end_qualifier: {:end_qualifier_closed, "column4"},
family_name: "family",
start_qualifier: {:start_qualifier_closed, "column2"}
}
}
}
column_range(request, family_name, range) View Source
Adds a column range Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Column range should be provided in the format {start, end} or {start, end, inclusive}.
Defaults to inclusive start and end column qualifiers.
Examples
iex> range = {"column2", "column4"}
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.column_range("family", range)
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {
:column_range_filter,
%Google.Bigtable.V2.ColumnRange{
end_qualifier: {:end_qualifier_closed, "column4"},
family_name: "family",
start_qualifier: {:start_qualifier_closed, "column2"}
}
}
}
create_range(family_name, arg)
View Source
create_range(binary(), column_range()) :: Google.Bigtable.V2.ColumnRange.t()
create_range(binary(), column_range()) :: Google.Bigtable.V2.ColumnRange.t()
family_name_regex(regex)
View Source
family_name_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
family_name_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
Creates a family name regex Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.family_name_regex("^testFamily$")
%Google.Bigtable.V2.RowFilter{
filter: {:family_name_regex_filter, "^testFamily$"}
}
family_name_regex(request, regex)
View Source
family_name_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
family_name_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a family name regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.family_name_regex("^testFamily$")
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:family_name_regex_filter, "^testFamily$"}
}
pass_all()
View Source
pass_all() :: Google.Bigtable.V2.RowFilter.t()
pass_all() :: Google.Bigtable.V2.RowFilter.t()
Creates a pass all Google.Bigtable.V2.RowFilter.
Matches all cells, regardless of input. Functionally equivalent to leaving filter unset, but included for completeness.
Examples
iex> Bigtable.RowFilter.pass_all()
%Google.Bigtable.V2.RowFilter{
filter: {:pass_all_filter, true}
}
pass_all(request)
View Source
pass_all(Google.Bigtable.V2.ReadRowsRequest.t()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
pass_all(Google.Bigtable.V2.ReadRowsRequest.t()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a pass all Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.pass_all()
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:pass_all_filter, true}
}
row_key_regex(regex)
View Source
row_key_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
row_key_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
Creates a row key regex Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.row_key_regex("^Test#\w+")
%Google.Bigtable.V2.RowFilter{
filter: {:row_key_regex_filter, "^Test#\w+"}
}
row_key_regex(request, regex)
View Source
row_key_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
row_key_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a row key regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.row_key_regex("^Test#\w+")
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:row_key_regex_filter, "^Test#\w+"}
}
strip_value_transformer()
View Source
strip_value_transformer() :: Google.Bigtable.V2.RowFilter.t()
strip_value_transformer() :: Google.Bigtable.V2.RowFilter.t()
Creates a strip value transformer Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.strip_value_transformer()
%Google.Bigtable.V2.RowFilter{
filter: {:strip_value_transformer, true}
}
strip_value_transformer(request)
View Source
strip_value_transformer(Google.Bigtable.V2.ReadRowsRequest.t()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
strip_value_transformer(Google.Bigtable.V2.ReadRowsRequest.t()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a strip value transformer Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.strip_value_transformer()
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:strip_value_transformer, true}
}
timestamp_range(timestamps)
View Source
timestamp_range(Keyword.t()) :: Google.Bigtable.V2.RowFilter.t()
timestamp_range(Keyword.t()) :: Google.Bigtable.V2.RowFilter.t()
Creates a timestamp range Google.Bigtable.V2.RowFilter.
start_timestamp: Inclusive lower bound. If left empty, interpreted as 0.
end_timestamp: Exclusive upper bound. If left empty, interpreted as infinity.
Examples
iex> range = [start_timestamp: 1000, end_timestamp: 2000]
iex> Bigtable.RowFilter.timestamp_range(range)
%Google.Bigtable.V2.RowFilter{
filter: {
:timestamp_range_filter,
%Google.Bigtable.V2.TimestampRange{
end_timestamp_micros: 2000,
start_timestamp_micros: 1000
}
}
}
timestamp_range(request, timestamps)
View Source
timestamp_range(Google.Bigtable.V2.ReadRowsRequest.t(), Keyword.t()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
timestamp_range(Google.Bigtable.V2.ReadRowsRequest.t(), Keyword.t()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a timestamp range Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
start_timestamp: Inclusive lower bound. If left empty, interpreted as 0.
end_timestamp: Exclusive upper bound. If left empty, interpreted as infinity.
Examples
iex> range = [start_timestamp: 1000, end_timestamp: 2000]
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.timestamp_range(range)
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {
:timestamp_range_filter,
%Google.Bigtable.V2.TimestampRange{
end_timestamp_micros: 2000,
start_timestamp_micros: 1000
}
}
}
value_regex(regex)
View Source
value_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
value_regex(binary()) :: Google.Bigtable.V2.RowFilter.t()
Creates a value regex Google.Bigtable.V2.RowFilter.
Examples
iex> Bigtable.RowFilter.value_regex("^test$")
%Google.Bigtable.V2.RowFilter{
filter: {:value_regex_filter, "^test$"}
}
value_regex(request, regex)
View Source
value_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) ::
Google.Bigtable.V2.ReadRowsRequest.t()
value_regex(Google.Bigtable.V2.ReadRowsRequest.t(), binary()) :: Google.Bigtable.V2.ReadRowsRequest.t()
Adds a value regex Google.Bigtable.V2.RowFilter a Google.Bigtable.V2.ReadRowsRequest.
Examples
iex> request = Bigtable.ReadRows.build() |> Bigtable.RowFilter.value_regex("^test$")
iex> with %Google.Bigtable.V2.ReadRowsRequest{} <- request, do: request.filter
%Google.Bigtable.V2.RowFilter{
filter: {:value_regex_filter, "^test$"}
}