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

Link to this type

column_range() View Source
column_range() :: {binary(), binary(), boolean()} | {binary(), binary()}

Link to this section Functions

Link to this function

apply_label_transformer(label) View Source
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"}
}
Link to this function

apply_label_transformer(request, label) View Source
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"}
}
Link to this function

block_all() View Source
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}
}
Link to this function

block_all(request) View Source
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}
}
Link to this function

cells_per_column(limit) View Source
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}
}
Link to this function

cells_per_column(request, limit) View Source
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}
}
Link to this function

cells_per_row(limit) View Source
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}
}
Link to this function

cells_per_row(request, limit) View Source
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}
}
Link to this function

cells_per_row_offset(offset) View Source
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}
}
Link to this function

cells_per_row_offset(request, offset) View Source
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}
}
Link to this function

chain(request, filters) View Source
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+"}
      }
    ]
  }}
}
Link to this function

column_qualifier_regex(regex) View Source
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$"}
}
Link to this function

column_qualifier_regex(request, regex) View Source
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$"}
}
Link to this function

column_range(family_name, range) View Source
column_range(binary(), {binary(), binary(), boolean()} | {binary(), binary()}) ::
  Google.Bigtable.V2.RowFilter.t()

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"}
    }
  }
}
Link to this function

column_range(request, family_name, range) View Source
column_range(
  Google.Bigtable.V2.ReadRowsRequest.t(),
  binary(),
  {binary(), binary()} | {binary(), binary(), boolean()}
) :: Google.Bigtable.V2.ReadRowsRequest.t()

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"}
    }
  }
}
Link to this function

create_range(family_name, arg) View Source
create_range(binary(), column_range()) :: Google.Bigtable.V2.ColumnRange.t()

Link to this function

family_name_regex(regex) View Source
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$"}
}
Link to this function

family_name_regex(request, regex) View Source
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$"}
}
Link to this function

pass_all() View Source
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}
}
Link to this function

pass_all(request) View Source
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}
}
Link to this function

row_key_regex(regex) View Source
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+"}
}
Link to this function

row_key_regex(request, regex) View Source
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+"}
}
Link to this function

strip_value_transformer() View Source
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}
}
Link to this function

strip_value_transformer(request) View Source
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}
}
Link to this function

timestamp_range(timestamps) View Source
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
    }
  }
}
Link to this function

timestamp_range(request, timestamps) View Source
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
    }
  }
}
Link to this function

value_regex(regex) View Source
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$"}
}
Link to this function

value_regex(request, regex) View Source
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$"}
}