Bigtable v0.1.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 a cells per column Google.Bigtable.V2.RowFilter
Adds a cells per column 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 row key regex Google.Bigtable.V2.RowFilter
Adds a row key regex Google.Bigtable.V2.RowFilter
a Google.Bigtable.V2.ReadRowsRequest
Link to this section Functions
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}
}
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+"}
}
]
}}
}
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+"}
}