pub struct Binder {Show 22 fields
catalog: ArcRwLockReadGuard<RawRwLock, Catalog>,
user: ArcRwLockReadGuard<RawRwLock, UserInfoManager>,
db_name: String,
database_id: u32,
session_id: SessionId,
context: BindContext,
auth_context: Arc<AuthContext>,
upper_subquery_contexts: Vec<(BindContext, Vec<LateralBindContext>)>,
lateral_contexts: Vec<LateralBindContext>,
next_subquery_id: usize,
next_values_id: usize,
next_share_id: usize,
session_config: Arc<RwLock<SessionConfig>>,
search_path: SearchPath,
bind_for: BindFor,
shared_views: HashMap<u32, usize>,
included_relations: HashSet<TableId>,
included_udfs: HashSet<FunctionId>,
param_types: ParameterTypes,
temporary_source_manager: TemporarySourceManager,
staging_catalog_manager: StagingCatalogManager,
secure_compare_context: Option<SecureCompareContext>,
}Expand description
Binder binds the identifiers in AST to columns in relations
Fields§
§catalog: ArcRwLockReadGuard<RawRwLock, Catalog>§user: ArcRwLockReadGuard<RawRwLock, UserInfoManager>§db_name: String§database_id: u32§session_id: SessionId§context: BindContext§auth_context: Arc<AuthContext>§upper_subquery_contexts: Vec<(BindContext, Vec<LateralBindContext>)>A stack holding contexts of outer queries when binding a subquery. It also holds all of the lateral contexts for each respective subquery.
See Binder::bind_subquery_expr for details.
lateral_contexts: Vec<LateralBindContext>A stack holding contexts of left-lateral TableFactors.
We need a separate stack as CorrelatedInputRef depth is
determined by the upper subquery context depth, not the lateral context stack depth.
next_subquery_id: usize§next_values_id: usizeThe ShareId is used to identify the share relation which could be a CTE, a source, a view
and so on.
session_config: Arc<RwLock<SessionConfig>>§search_path: SearchPath§bind_for: BindForThe type of binding statement.
ShareIds identifying shared views.
included_relations: HashSet<TableId>The included relations while binding a query.
included_udfs: HashSet<FunctionId>The included user-defined functions while binding a query.
param_types: ParameterTypes§temporary_source_manager: TemporarySourceManagerThe temporary sources that will be used during binding phase
staging_catalog_manager: StagingCatalogManagerThe staging catalogs that will be used during binding phase
secure_compare_context: Option<SecureCompareContext>Information for secure_compare function. It’s ONLY available when binding the
VALIDATE clause of Webhook source i.e. VALIDATE SECRET ... AS SECURE_COMPARE(...).
Implementations§
Source§impl Binder
impl Binder
pub fn bind_columns_to_context( &mut self, name: String, column_catalogs: &[ColumnCatalog], ) -> Result<()>
pub fn get_column_binding_index( &mut self, table_name: String, column_name: &String, ) -> Result<usize>
Source§impl Binder
impl Binder
pub(super) fn bind_delete( &mut self, name: ObjectName, selection: Option<Expr>, returning_items: Vec<SelectItem>, ) -> Result<BoundDelete>
Source§impl Binder
impl Binder
pub(super) fn bind_binary_op( &mut self, left: &Expr, op: &BinaryOperator, right: &Expr, ) -> Result<ExprImpl>
fn resolve_binary_operator( op: &BinaryOperator, bound_left: &ExprImpl, bound_right: &ExprImpl, ) -> Result<Vec<ExprType>>
Source§impl Binder
impl Binder
fn ensure_aggregate_allowed(&self) -> Result<()>
pub(super) fn bind_aggregate_function( &mut self, agg_type: AggType, distinct: bool, args: Vec<ExprImpl>, order_by: &[OrderByExpr], within_group: Option<&OrderByExpr>, filter: Option<&Expr>, ) -> Result<ExprImpl>
fn bind_ordered_set_agg( &mut self, kind: &AggType, distinct: bool, args: Vec<ExprImpl>, order_by: &[OrderByExpr], within_group: Option<&OrderByExpr>, ) -> Result<(Vec<Literal>, Vec<ExprImpl>, OrderBy)>
fn bind_normal_agg( &mut self, kind: &AggType, distinct: bool, args: Vec<ExprImpl>, order_by: &[OrderByExpr], within_group: Option<&OrderByExpr>, ) -> Result<(Vec<Literal>, Vec<ExprImpl>, OrderBy)>
Source§impl Binder
impl Binder
fn ensure_window_function_allowed(&self) -> Result<()>
Sourcepub(super) fn bind_window_function(
&mut self,
kind: WindowFuncKind,
args: Vec<ExprImpl>,
ignore_nulls: bool,
filter: Option<&Expr>,
window: &Window,
) -> Result<ExprImpl>
pub(super) fn bind_window_function( &mut self, kind: WindowFuncKind, args: Vec<ExprImpl>, ignore_nulls: bool, filter: Option<&Expr>, window: &Window, ) -> Result<ExprImpl>
Bind window function calls according to PostgreSQL syntax. See https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS for syntax detail.
fn bind_window_frame_usize_bounds( &mut self, start: &WindowFrameBound, end: Option<&WindowFrameBound>, ) -> Result<(FrameBound<usize>, FrameBound<usize>)>
fn bind_window_frame_scalar_impl_bounds( &mut self, start: &WindowFrameBound, end: Option<&WindowFrameBound>, offset_data_type: &DataType, ) -> Result<(FrameBound<ScalarImpl>, FrameBound<ScalarImpl>)>
fn bind_window_frame_bound_offset( &mut self, offset: &Expr, cast_to: &DataType, ) -> Result<ScalarImpl>
Source§impl Binder
impl Binder
pub(in binder) fn bind_function( &mut self, _: &Function, ) -> Result<ExprImpl>
fn validate_and_bind_special_function_params( &mut self, func_name: &str, scalar_as_agg: bool, arg_list: &FunctionArgList, within_group: Option<&OrderByExpr>, filter: Option<&Expr>, over: Option<&Window>, ) -> Result<ExprImpl>
fn bind_array_transform(&mut self, args: &[FunctionArg]) -> Result<ExprImpl>
fn bind_unary_lambda_function( &mut self, input_ty: DataType, arg: Ident, body: Expr, ) -> Result<ExprImpl>
fn bind_map_filter(&mut self, args: &[FunctionArg]) -> Result<ExprImpl>
fn bind_binary_lambda_function( &mut self, first_arg: Ident, first_ty: DataType, second_arg: Ident, second_ty: DataType, body: Expr, ) -> Result<ExprImpl>
fn ensure_table_function_allowed(&self) -> Result<()>
Sourcepub(crate) fn extract_udf_expr(ast: Vec<Statement>) -> Result<AstExpr>
pub(crate) fn extract_udf_expr(ast: Vec<Statement>) -> Result<AstExpr>
A common utility function to extract sql udf expression out from the input ast.
pub fn bind_sql_udf_inner( &mut self, body: &str, arg_names: &[String], args: Vec<ExprImpl>, ) -> Result<ExprImpl>
fn bind_sql_udf( &mut self, func: Arc<FunctionCatalog>, args: Vec<ExprImpl>, ) -> Result<ExprImpl>
pub(in binder) fn bind_function_expr_arg( &mut self, arg_expr: &FunctionArgExpr, ) -> Result<Vec<ExprImpl>>
pub(in binder) fn bind_function_arg( &mut self, arg: &FunctionArg, ) -> Result<Vec<ExprImpl>>
Source§impl Binder
impl Binder
Sourcepub(super) fn bind_order_by_expr(
&mut self,
_: &OrderByExpr,
) -> Result<BoundOrderByExpr>
pub(super) fn bind_order_by_expr( &mut self, _: &OrderByExpr, ) -> Result<BoundOrderByExpr>
Bind an ORDER BY expression in other places than
Query,
including in OVER and in aggregate functions.
Different from a query-level ORDER BY (Self::bind_order_by_expr_in_query),
output-column names or numbers are not allowed here.
Source§impl Binder
impl Binder
pub fn bind_subquery_expr( &mut self, query: &Query, kind: SubqueryKind, ) -> Result<ExprImpl>
Source§impl Binder
impl Binder
pub fn bind_value(&mut self, value: &Value) -> Result<Literal>
pub(super) fn bind_string(&mut self, s: &str) -> Result<Literal>
fn bind_bool(&mut self, b: bool) -> Result<Literal>
fn bind_number(&mut self, s: String) -> Result<Literal>
fn bind_interval( &mut self, s: &str, leading_field: Option<AstDateTimeField>, ) -> Result<Literal>
pub(crate) fn bind_date_time_field(field: AstDateTimeField) -> DateTimeField
Sourcepub(super) fn bind_array(&mut self, exprs: &[Expr]) -> Result<ExprImpl>
pub(super) fn bind_array(&mut self, exprs: &[Expr]) -> Result<ExprImpl>
ARRAY[...] is represented as an function call at the binder stage.
pub(super) fn bind_map(&mut self, entries: &[(Expr, Expr)]) -> Result<ExprImpl>
pub(super) fn bind_array_cast( &mut self, exprs: &[Expr], element_type: &DataType, ) -> Result<ExprImpl>
pub(super) fn bind_map_cast( &mut self, entries: &[(Expr, Expr)], map_type: &MapType, ) -> Result<ExprImpl>
pub(super) fn bind_index( &mut self, obj: &Expr, index: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_array_range_index( &mut self, obj: &Expr, start: Option<&Expr>, end: Option<&Expr>, ) -> Result<ExprImpl>
Source§impl Binder
impl Binder
Sourcepub fn bind_expr(&mut self, expr: &Expr) -> Result<ExprImpl>
pub fn bind_expr(&mut self, expr: &Expr) -> Result<ExprImpl>
Bind an expression with bind_expr_inner, attach the original expression
to the error message.
This may only be called at the root of the expression tree or when crossing the boundary of a subquery. Otherwise, the source chain might be too deep and confusing to the user.
fn bind_expr_inner(&mut self, expr: &Expr) -> Result<ExprImpl>
pub(super) fn bind_extract( &mut self, field: &String, expr: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_at_time_zone( &mut self, input: &Expr, time_zone: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_in_list( &mut self, expr: &Expr, list: &[Expr], negated: bool, ) -> Result<ExprImpl>
pub(super) fn bind_in_subquery( &mut self, expr: &Expr, subquery: &Query, negated: bool, ) -> Result<ExprImpl>
pub(super) fn bind_is_json( &mut self, expr: &Expr, negated: bool, item_type: JsonPredicateType, ) -> Result<ExprImpl>
pub(super) fn bind_unary_expr( &mut self, op: &UnaryOperator, expr: &Expr, ) -> Result<ExprImpl>
Sourcefn rewrite_positive(&mut self, expr: &Expr) -> Result<ExprImpl>
fn rewrite_positive(&mut self, expr: &Expr) -> Result<ExprImpl>
Directly returns the expression itself if it is a positive number.
pub(super) fn bind_trim( &mut self, expr: &Expr, trim_where: Option<&TrimWhereField>, trim_what: Option<&Expr>, ) -> Result<ExprImpl>
fn bind_substring( &mut self, expr: &Expr, substring_from: Option<&Expr>, substring_for: Option<&Expr>, ) -> Result<ExprImpl>
fn bind_position(&mut self, substring: &Expr, string: &Expr) -> Result<ExprImpl>
fn bind_overlay( &mut self, expr: &Expr, new_substring: &Expr, start: &Expr, count: Option<&Expr>, ) -> Result<ExprImpl>
fn is_binding_inline_sql_udf(&self) -> bool
Sourcefn is_binding_subquery_sql_udf(&self) -> bool
fn is_binding_subquery_sql_udf(&self) -> bool
Returns whether we’re binding SQL UDF by checking if any of the upper subquery context has
sql_udf_arguments set.
Sourcefn bind_sql_udf_parameter(&mut self, name: &str) -> Result<ExprImpl>
fn bind_sql_udf_parameter(&mut self, name: &str) -> Result<ExprImpl>
Bind a parameter for SQL UDF.
fn bind_parameter(&mut self, index: u64) -> Result<ExprImpl>
Sourcepub(super) fn bind_between(
&mut self,
expr: &Expr,
negated: bool,
low: &Expr,
high: &Expr,
) -> Result<ExprImpl>
pub(super) fn bind_between( &mut self, expr: &Expr, negated: bool, low: &Expr, high: &Expr, ) -> Result<ExprImpl>
Bind expr (not) between low and high
fn bind_like( &mut self, expr_type: ExprType, expr: &Expr, negated: bool, pattern: &Expr, escape_char: Option<EscapeChar>, ) -> Result<ExprImpl>
Sourcepub(super) fn bind_similar_to(
&mut self,
expr: &Expr,
negated: bool,
pattern: &Expr,
escape_char: Option<EscapeChar>,
) -> Result<ExprImpl>
pub(super) fn bind_similar_to( &mut self, expr: &Expr, negated: bool, pattern: &Expr, escape_char: Option<EscapeChar>, ) -> Result<ExprImpl>
Bind <expr> [ NOT ] SIMILAR TO <pat> ESCAPE <esc_text>
Sourcefn check_constant_case_when_optimization(
&mut self,
conditions: &[Expr],
results_expr: &[ExprImpl],
operand: Option<&Expr>,
fallback: Option<&ExprImpl>,
constant_case_when_eval_inputs: &mut Vec<ExprImpl>,
) -> bool
fn check_constant_case_when_optimization( &mut self, conditions: &[Expr], results_expr: &[ExprImpl], operand: Option<&Expr>, fallback: Option<&ExprImpl>, constant_case_when_eval_inputs: &mut Vec<ExprImpl>, ) -> bool
The optimization check for the following case-when expression pattern e.g., select case 1 when (…) then (…) else (…) end;
Sourcefn compare_or_set(col_expr: &mut Option<Expr>, test_expr: &Expr) -> bool
fn compare_or_set(col_expr: &mut Option<Expr>, test_expr: &Expr) -> bool
Helper function to compare or set column identifier
used in check_convert_simple_form
Sourcefn check_invariant(left: &Expr, op: &BinaryOperator, right: &Expr) -> bool
fn check_invariant(left: &Expr, op: &BinaryOperator, right: &Expr) -> bool
left expression and right expression must be either:
<constant> <Eq> <identifier> or <identifier> <Eq> <constant>
used in check_convert_simple_form
Sourcefn try_extract_simple_form(
&mut self,
ident_expr: &Expr,
constant_expr: &Expr,
column_expr: &mut Option<Expr>,
inputs: &mut Vec<ExprImpl>,
) -> bool
fn try_extract_simple_form( &mut self, ident_expr: &Expr, constant_expr: &Expr, column_expr: &mut Option<Expr>, inputs: &mut Vec<ExprImpl>, ) -> bool
Helper function to extract expression out and insert
the corresponding bound version to inputs
used in check_convert_simple_form
Note: this function will be invoked per arm
Sourcefn check_convert_simple_form(
&mut self,
conditions: &[Expr],
results_expr: &[ExprImpl],
fallback: Option<ExprImpl>,
constant_lookup_inputs: &mut Vec<ExprImpl>,
) -> bool
fn check_convert_simple_form( &mut self, conditions: &[Expr], results_expr: &[ExprImpl], fallback: Option<ExprImpl>, constant_lookup_inputs: &mut Vec<ExprImpl>, ) -> bool
See if the case when expression in form
select case when <expr_1 = constant> (...with same pattern...) else <constant> end;
If so, this expression could also be converted to constant lookup
Sourcefn check_bind_case_optimization(
&mut self,
conditions: &[Expr],
results_expr: &[ExprImpl],
operand: Option<&Expr>,
fallback: Option<ExprImpl>,
constant_lookup_inputs: &mut Vec<ExprImpl>,
) -> bool
fn check_bind_case_optimization( &mut self, conditions: &[Expr], results_expr: &[ExprImpl], operand: Option<&Expr>, fallback: Option<ExprImpl>, constant_lookup_inputs: &mut Vec<ExprImpl>, ) -> bool
The helper function to check if the current case-when
expression in bind_case could be optimized
into ConstantLookupExpression
pub(super) fn bind_case( &mut self, operand: Option<&Expr>, conditions: &[Expr], results: &[Expr], else_result: Option<&Expr>, ) -> Result<ExprImpl>
pub(super) fn bind_is_operator( &mut self, func_type: ExprType, expr: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_is_unknown( &mut self, func_type: ExprType, expr: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_distinct_from( &mut self, left: &Expr, right: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_not_distinct_from( &mut self, left: &Expr, right: &Expr, ) -> Result<ExprImpl>
pub(super) fn bind_cast( &mut self, expr: &Expr, data_type: &AstDataType, ) -> Result<ExprImpl>
pub fn bind_cast_inner( &mut self, expr: &Expr, data_type: &DataType, ) -> Result<ExprImpl>
pub fn bind_collate( &mut self, expr: &Expr, collation: &ObjectName, ) -> Result<ExprImpl>
Source§impl Binder
impl Binder
pub fn bind_fetch_cursor( &mut self, cursor_name: String, count: u32, returning_schema: Option<Schema>, ) -> Result<BoundFetchCursor>
Source§impl Binder
impl Binder
pub fn bind_sink_by_name(&self, name: ObjectName) -> Result<BoundSink>
pub fn bind_view_by_name(&self, name: ObjectName) -> Result<BoundView>
Source§impl Binder
impl Binder
pub(super) fn bind_insert( &mut self, name: ObjectName, cols_to_insert_by_user: Vec<Ident>, source: Query, returning_items: Vec<SelectItem>, ) -> Result<BoundInsert>
Source§impl Binder
impl Binder
Sourcepub fn bind_query(&mut self, query: &Query) -> Result<BoundQuery>
pub fn bind_query(&mut self, query: &Query) -> Result<BoundQuery>
Bind a Query.
Before binding the Query, we push the current BindContext to the
stack and create a new context, because it may be a subquery.
After finishing binding, we pop the previous context from the stack.
Sourcepub fn bind_query_for_view(&mut self, query: &Query) -> Result<BoundQuery>
pub fn bind_query_for_view(&mut self, query: &Query) -> Result<BoundQuery>
Bind a Query for view.
TODO: support SECURITY INVOKER for view.
Sourcepub(super) fn bind_query_inner(&mut self, _: &Query) -> Result<BoundQuery>
pub(super) fn bind_query_inner(&mut self, _: &Query) -> Result<BoundQuery>
Bind a Query using the current BindContext.
pub fn build_name_to_index( names: impl Iterator<Item = String>, ) -> HashMap<String, usize>
Sourcefn bind_order_by_expr_in_query(
&mut self,
_: &OrderByExpr,
name_to_index: &HashMap<String, usize>,
extra_order_exprs: &mut Vec<ExprImpl>,
visible_output_num: usize,
) -> Result<ColumnOrder>
fn bind_order_by_expr_in_query( &mut self, _: &OrderByExpr, name_to_index: &HashMap<String, usize>, extra_order_exprs: &mut Vec<ExprImpl>, visible_output_num: usize, ) -> Result<ColumnOrder>
Bind an ORDER BY expression in a Query, which can be either:
- an output-column name
- index of an output column
- an arbitrary expression
Refer to bind_group_by_expr_in_select to see their similarities and differences.
§Arguments
name_to_index- visible output column name -> index. Ambiguous (duplicate) output names are marked withusize::MAX.visible_output_num- the number of all visible output columns, including duplicates.
fn bind_with(&mut self, with: &With) -> Result<()>
Sourcefn validate_rcte(
query: &Query,
) -> Result<(bool, &Corresponding, &SetExpr, &SetExpr, Option<&With>)>
fn validate_rcte( query: &Query, ) -> Result<(bool, &Corresponding, &SetExpr, &SetExpr, Option<&With>)>
syntactically validate the recursive cte ast with the current support features in rw.
fn bind_rcte( &mut self, with: Option<&With>, entry: Rc<RefCell<BindingCte>>, left: &SetExpr, right: &SetExpr, all: bool, ) -> Result<()>
fn bind_rcte_inner( &mut self, with: Option<&With>, entry: Rc<RefCell<BindingCte>>, left: &SetExpr, right: &SetExpr, all: bool, ) -> Result<()>
Source§impl Binder
impl Binder
pub(crate) fn bind_vec_table_with_joins( &mut self, from: &[TableWithJoins], ) -> Result<Option<Relation>>
pub(crate) fn bind_table_with_joins( &mut self, table: &TableWithJoins, ) -> Result<Relation>
fn bind_join_constraint( &mut self, constraint: &JoinConstraint, table_factor: Option<&TableFactor>, join_type: JoinType, ) -> Result<(ExprImpl, Option<Relation>)>
fn get_identifier_from_indices( context: &BindContext, indices: &[usize], column: Ident, ) -> Result<Expr>
Source§impl Binder
impl Binder
Sourcepub(super) fn bind_subquery_relation(
&mut self,
query: &Query,
alias: Option<&TableAlias>,
lateral: bool,
) -> Result<BoundSubquery>
pub(super) fn bind_subquery_relation( &mut self, query: &Query, alias: Option<&TableAlias>, lateral: bool, ) -> Result<BoundSubquery>
Binds a subquery using bind_query, which will use a new empty
BindContext for it.
After finishing binding, we update the current context with the output of the subquery.
Source§impl Binder
impl Binder
Sourcepub(super) fn bind_table_function(
&mut self,
name: &ObjectName,
alias: Option<&TableAlias>,
args: &[FunctionArg],
with_ordinality: bool,
) -> Result<Relation>
pub(super) fn bind_table_function( &mut self, name: &ObjectName, alias: Option<&TableAlias>, args: &[FunctionArg], with_ordinality: bool, ) -> Result<Relation>
Binds a table function AST, which is a function call in a relation position.
Besides crate::expr::TableFunction expr, it can also be other things like window table
functions, or scalar functions.
with_ordinality is only supported for the TableFunction case now.
Source§impl Binder
impl Binder
pub fn bind_catalog_relation_by_object_name( &mut self, object_name: &ObjectName, bind_creating_relations: bool, ) -> Result<Relation>
Sourcepub fn bind_catalog_relation_by_name(
&mut self,
db_name: Option<&str>,
schema_name: Option<&str>,
table_name: &str,
alias: Option<&TableAlias>,
as_of: Option<&AsOf>,
bind_creating_relations: bool,
) -> Result<Relation>
pub fn bind_catalog_relation_by_name( &mut self, db_name: Option<&str>, schema_name: Option<&str>, table_name: &str, alias: Option<&TableAlias>, as_of: Option<&AsOf>, bind_creating_relations: bool, ) -> Result<Relation>
Binds table or source, or logical view according to what we get from the catalog.
pub(crate) fn check_privilege( &self, item: ObjectCheckItem, database_id: u32, ) -> Result<()>
fn resolve_table_relation( &mut self, table_catalog: Arc<TableCatalog>, db_name: &str, schema_name: &str, as_of: Option<&AsOf>, ) -> Result<(Relation, Vec<(bool, Field)>)>
fn resolve_source_relation( &mut self, source_catalog: &SourceCatalog, as_of: Option<&AsOf>, is_temporary: bool, ) -> Result<(Relation, Vec<(bool, Field)>)>
fn resolve_view_relation( &mut self, view_catalog: &ViewCatalog, ) -> Result<(Relation, Vec<(bool, Field)>)>
fn resolve_table_indexes( &self, db_name: &str, schema_name: &str, table_id: TableId, ) -> Result<Vec<Arc<IndexCatalog>>>
pub(crate) fn bind_table( &mut self, schema_name: Option<&str>, table_name: &str, ) -> Result<BoundBaseTable>
pub(crate) fn check_for_dml(table: &TableCatalog, is_insert: bool) -> Result<()>
Source§impl Binder
impl Binder
pub(super) fn bind_watermark( &mut self, alias: Option<&TableAlias>, args: &[FunctionArg], ) -> Result<BoundWatermark>
Source§impl Binder
impl Binder
pub(super) fn bind_window_table_function( &mut self, alias: Option<&TableAlias>, kind: WindowTableFunctionKind, args: &[FunctionArg], ) -> Result<BoundWindowTableFunction>
Source§impl Binder
impl Binder
Sourcepub fn resolve_schema_qualified_name(
db_name: &str,
name: &ObjectName,
) -> Result<(Option<String>, String), ResolveQualifiedNameError>
pub fn resolve_schema_qualified_name( db_name: &str, name: &ObjectName, ) -> Result<(Option<String>, String), ResolveQualifiedNameError>
return (schema_name, name)
Sourcepub fn validate_cross_db_reference(
db_name: &str,
name: &ObjectName,
) -> Result<(), ResolveQualifiedNameError>
pub fn validate_cross_db_reference( db_name: &str, name: &ObjectName, ) -> Result<(), ResolveQualifiedNameError>
check whether the name is a cross-database reference
Sourcepub fn resolve_db_schema_qualified_name(
name: &ObjectName,
) -> Result<(Option<String>, Option<String>, String), ResolveQualifiedNameError>
pub fn resolve_db_schema_qualified_name( name: &ObjectName, ) -> Result<(Option<String>, Option<String>, String), ResolveQualifiedNameError>
return (database_name, schema_name, name)
Sourcefn resolve_single_name(
identifiers: Vec<Ident>,
ident_desc: &str,
) -> Result<String>
fn resolve_single_name( identifiers: Vec<Ident>, ident_desc: &str, ) -> Result<String>
return first name in identifiers, must have only one name.
Sourcepub fn resolve_database_name(name: ObjectName) -> Result<String>
pub fn resolve_database_name(name: ObjectName) -> Result<String>
return the database_name
Sourcepub fn resolve_schema_name(name: ObjectName) -> Result<String>
pub fn resolve_schema_name(name: ObjectName) -> Result<String>
return the schema_name
Sourcepub fn resolve_index_name(name: ObjectName) -> Result<String>
pub fn resolve_index_name(name: ObjectName) -> Result<String>
return the index_name
Sourcepub fn resolve_view_name(name: ObjectName) -> Result<String>
pub fn resolve_view_name(name: ObjectName) -> Result<String>
return the view_name
Sourcepub fn resolve_sink_name(name: ObjectName) -> Result<String>
pub fn resolve_sink_name(name: ObjectName) -> Result<String>
return the sink_name
Sourcepub fn resolve_subscription_name(name: ObjectName) -> Result<String>
pub fn resolve_subscription_name(name: ObjectName) -> Result<String>
return the subscription_name
Sourcepub fn resolve_table_name(name: ObjectName) -> Result<String>
pub fn resolve_table_name(name: ObjectName) -> Result<String>
return the table_name
Sourcepub fn resolve_source_name(name: ObjectName) -> Result<String>
pub fn resolve_source_name(name: ObjectName) -> Result<String>
return the source_name
Sourcepub fn resolve_user_name(name: ObjectName) -> Result<String>
pub fn resolve_user_name(name: ObjectName) -> Result<String>
return the user_name
Sourcepub(super) fn bind_table_to_context(
&mut self,
columns: impl IntoIterator<Item = (bool, Field)>,
table_name: String,
alias: Option<&TableAlias>,
) -> Result<()>
pub(super) fn bind_table_to_context( &mut self, columns: impl IntoIterator<Item = (bool, Field)>, table_name: String, alias: Option<&TableAlias>, ) -> Result<()>
Fill the BindContext for table.
Sourcepub fn bind_relation_by_name(
&mut self,
name: &ObjectName,
alias: Option<&TableAlias>,
as_of: Option<&AsOf>,
allow_cross_db: bool,
) -> Result<Relation>
pub fn bind_relation_by_name( &mut self, name: &ObjectName, alias: Option<&TableAlias>, as_of: Option<&AsOf>, allow_cross_db: bool, ) -> Result<Relation>
Binds a relation, which can be:
- a table/source/materialized view
- a reference to a CTE
- a logical view
fn bind_relation_by_function_arg( &mut self, arg: Option<&FunctionArg>, err_msg: &str, ) -> Result<(Relation, ObjectName)>
fn bind_column_by_function_args( &mut self, arg: Option<&FunctionArg>, err_msg: &str, ) -> Result<Box<InputRef>>
Sourcefn bind_internal_table(
&mut self,
args: &[FunctionArg],
alias: Option<&TableAlias>,
) -> Result<Relation>
fn bind_internal_table( &mut self, args: &[FunctionArg], alias: Option<&TableAlias>, ) -> Result<Relation>
rw_table(table_id[,schema_name]) which queries internal table
pub(super) fn bind_table_factor( &mut self, table_factor: &TableFactor, ) -> Result<Relation>
Source§impl Binder
impl Binder
pub(super) fn bind_select(&mut self, select: &Select) -> Result<BoundSelect>
pub fn bind_select_list( &mut self, select_items: &[SelectItem], ) -> Result<(Vec<ExprImpl>, Vec<Option<String>>)>
Sourcefn bind_group_by_expr_in_select(
&mut self,
expr: &Expr,
name_to_index: &HashMap<String, usize>,
select_items: &[ExprImpl],
) -> Result<ExprImpl>
fn bind_group_by_expr_in_select( &mut self, expr: &Expr, name_to_index: &HashMap<String, usize>, select_items: &[ExprImpl], ) -> Result<ExprImpl>
Bind an GROUP BY expression in a Select, which can be either:
- index of an output column
- an arbitrary expression on input columns
- an output-column name
Note the differences from bind_order_by_expr_in_query:
- When a name matches both an input column and an output column,
group byinterprets it as input column whileorder byinterprets it as output column. - As the name suggests,
group byis part ofselectwhileorder byis part ofquery. Aquerymay consist unions of multipleselects (each with their owngroup by) but only oneorder by. - Logically / semantically,
group byevaluates beforeselect items, which evaluates beforeorder by. This means,group bycan evaluate arbitrary expressions itself, or take expressions fromselect items(weclonehere andlogical_aggwill rewrite thoseselect itemstoInputRef). However,order bycan only refer toselect items, or append its extra arbitrary expressions as hiddenselect itemsfor evaluation.
§Arguments
name_to_index- output column name -> index. Ambiguous (duplicate) output names are marked withusize::MAX.
fn bind_grouping_items_expr_in_select( &mut self, grouping_items: Vec<Vec<Expr>>, name_to_index: &HashMap<String, usize>, select_items: &[ExprImpl], ) -> Result<Vec<Vec<ExprImpl>>>
pub fn bind_returning_list( &mut self, returning_items: Vec<SelectItem>, ) -> Result<(Vec<ExprImpl>, Vec<Field>)>
pub fn iter_bound_columns<'a>( column_binding: impl Iterator<Item = &'a ColumnBinding>, ) -> (Vec<ExprImpl>, Vec<Option<String>>)
pub fn iter_column_groups(&self) -> (Vec<ExprImpl>, Vec<Option<String>>)
Sourcefn bind_distinct_on(
&mut self,
distinct: &Distinct,
name_to_index: &HashMap<String, usize>,
select_items: &[ExprImpl],
) -> Result<BoundDistinct>
fn bind_distinct_on( &mut self, distinct: &Distinct, name_to_index: &HashMap<String, usize>, select_items: &[ExprImpl], ) -> Result<BoundDistinct>
Bind DISTINCT clause in a Select.
Note that for DISTINCT ON, each expression is interpreted in the same way as ORDER BY
expression, which means it will be bound in the following order:
- as an output-column name (can use aliases)
- as an index (from 1) of an output column
- as an arbitrary expression (cannot use aliases)
See also the bind_order_by_expr_in_query method.
§Arguments
name_to_index- output column name -> index. Ambiguous (duplicate) output names are marked withusize::MAX.
fn generate_except_indices( &mut self, except: Option<&[Expr]>, ) -> Result<HashSet<usize>>
Source§impl Binder
impl Binder
Sourcepub(crate) fn align_schema(
left: &mut BoundSetExpr,
right: &mut BoundSetExpr,
op: SetOperator,
) -> Result<()>
pub(crate) fn align_schema( left: &mut BoundSetExpr, right: &mut BoundSetExpr, op: SetOperator, ) -> Result<()>
note: align_schema only works when the left and right
are both select expression(s).
Sourcepub(crate) fn validate(
left: &BoundSetExpr,
right: &BoundSetExpr,
op: SetOperator,
) -> Result<()>
pub(crate) fn validate( left: &BoundSetExpr, right: &BoundSetExpr, op: SetOperator, ) -> Result<()>
validate the schema, should be called after aligning.
Sourcefn corresponding(
&self,
left: &BoundSetExpr,
right: &BoundSetExpr,
corresponding: &Corresponding,
op: &SetOperator,
) -> Result<(ColIndexMapping, ColIndexMapping)>
fn corresponding( &self, left: &BoundSetExpr, right: &BoundSetExpr, corresponding: &Corresponding, op: &SetOperator, ) -> Result<(ColIndexMapping, ColIndexMapping)>
Check the corresponding specification of the set operation. Returns the corresponding column index of the left and right side.
pub(super) fn bind_set_expr( &mut self, set_expr: &SetExpr, ) -> Result<BoundSetExpr>
Source§impl Binder
impl Binder
pub(super) fn bind_statement( &mut self, stmt: Statement, ) -> Result<BoundStatement>
Source§impl Binder
impl Binder
Sourcefn extract_struct_column(
&mut self,
expr: &Expr,
field_idents: &[Ident],
) -> Result<(ExprImpl, Vec<Ident>)>
fn extract_struct_column( &mut self, expr: &Expr, field_idents: &[Ident], ) -> Result<(ExprImpl, Vec<Ident>)>
Extracts and binds struct column from expr.
Returns the bound column and the remaining fields.
Specifically,
(table).struct_col.fields->(bound_struct_col, fields)- Otherwise,
exprcorresponds to a column.(expr).fields->(bound_expr, fields)
Sourcepub fn bind_wildcard_field_column(
&mut self,
expr: &Expr,
prefix: &[Ident],
) -> Result<(Vec<ExprImpl>, Vec<Option<String>>)>
pub fn bind_wildcard_field_column( &mut self, expr: &Expr, prefix: &[Ident], ) -> Result<(Vec<ExprImpl>, Vec<Option<String>>)>
Binds wildcard field column, e.g. (table.v1).* or (table).v1.*.
Returns a vector of Field(expr, int) expressions and aliases.
Sourcepub fn bind_single_field_column(
&mut self,
expr: &Expr,
idents: &[Ident],
) -> Result<ExprImpl>
pub fn bind_single_field_column( &mut self, expr: &Expr, idents: &[Ident], ) -> Result<ExprImpl>
Binds single field column, e.g. (table.v1).v2 or (table).v1.v2.
Returns a Field(expr, int) expression.
Source§impl Binder
impl Binder
pub(super) fn bind_update( &mut self, name: ObjectName, assignments: Vec<Assignment>, selection: Option<Expr>, returning_items: Vec<SelectItem>, ) -> Result<BoundUpdate>
Source§impl Binder
impl Binder
Sourcepub(super) fn bind_values(
&mut self,
values: &Values,
expected_types: Option<&[DataType]>,
) -> Result<BoundValues>
pub(super) fn bind_values( &mut self, values: &Values, expected_types: Option<&[DataType]>, ) -> Result<BoundValues>
Bind Values with given expected_types. If no types are expected, a compatible type for
all rows will be used.
If values are shorter than expected, NULLs will be filled.
Source§impl Binder
impl Binder
fn new(session: &SessionImpl, bind_for: BindFor) -> Binder
pub fn new_for_batch(session: &SessionImpl) -> Binder
pub fn new_for_stream(session: &SessionImpl) -> Binder
pub fn new_for_ddl(session: &SessionImpl) -> Binder
pub fn new_for_system(session: &SessionImpl) -> Binder
Sourcepub fn with_specified_params_types(
self,
param_types: Vec<Option<DataType>>,
) -> Self
pub fn with_specified_params_types( self, param_types: Vec<Option<DataType>>, ) -> Self
Set the specified parameter types.
Sourcepub fn with_secure_compare(self, ctx: SecureCompareContext) -> Self
pub fn with_secure_compare(self, ctx: SecureCompareContext) -> Self
Set the secure compare context.
fn is_for_stream(&self) -> bool
fn is_for_batch(&self) -> bool
fn is_for_ddl(&self) -> bool
pub fn export_param_types(&self) -> Result<Vec<DataType>>
Sourcepub fn included_relations(&self) -> &HashSet<TableId>
pub fn included_relations(&self) -> &HashSet<TableId>
Get included relations in the query after binding. This is used for resolving relation dependencies. Note that it only contains referenced relations discovered during binding. After the plan is built, the referenced relations may be changed. We cannot rely on the collection result of plan, because we still need to record the dependencies that have been optimised away.
Sourcepub fn included_udfs(&self) -> &HashSet<FunctionId>
pub fn included_udfs(&self) -> &HashSet<FunctionId>
Get included user-defined functions in the query after binding.
fn push_context(&mut self)
fn pop_context(&mut self) -> Result<()>
fn push_lateral_context(&mut self)
fn pop_and_merge_lateral_context(&mut self) -> Result<()>
fn try_mark_lateral_as_visible(&mut self)
fn try_mark_lateral_as_invisible(&mut self)
Sourcefn visible_upper_subquery_contexts_rev(
&self,
) -> impl Iterator<Item = &(BindContext, Vec<LateralBindContext>)> + '_
fn visible_upper_subquery_contexts_rev( &self, ) -> impl Iterator<Item = &(BindContext, Vec<LateralBindContext>)> + '_
Returns a reverse iterator over the upper subquery contexts that are visible to the current
context. Not to be confused with is_visible in LateralBindContext.
In most cases, this should include all the upper subquery contexts. However, when binding SQL UDFs, we should avoid resolving the context outside the UDF for hygiene.
fn next_subquery_id(&mut self) -> usize
fn next_values_id(&mut self) -> usize
fn first_valid_schema(&self) -> Result<&SchemaCatalog, CatalogError>
fn bind_schema_path<'a>( &'a self, schema_name: Option<&'a str>, ) -> SchemaPath<'a>
pub fn set_clause(&mut self, clause: Option<Clause>)
Auto Trait Implementations§
impl Freeze for Binder
impl !RefUnwindSafe for Binder
impl !Send for Binder
impl !Sync for Binder
impl Unpin for Binder
impl !UnwindSafe for Binder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
Source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level.Source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n.Source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
RelabeledMetricVec::with_metric_level_relabel_n with metric_level set to
MetricLevel::Debug and relabel_num set to 1.§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Scope for T
impl<T> Scope for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.