Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/sqlfluff/sqlfluff
/ functions
Functions
2,340 in github.com/sqlfluff/sqlfluff
⨍
Functions
2,340
◇
Types & classes
2,379
↳
Endpoints
59
↓ 1 callers
Method
__init__
( self, segments: tuple[BaseSegment, ...], pos_marker: Optional[PositionMarker] = None
src/sqlfluff/core/parser/segments/base.py:194
↓ 1 callers
Method
__init__
(self, works_on_unparsable: bool = False, **kwargs: Any)
src/sqlfluff/core/rules/crawlers.py:15
↓ 1 callers
Method
__init__
(self, config: FluffConfig)
src/sqlfluff/cli/outputstream.py:37
↓ 1 callers
Method
__new__
Generate a new class. We use the `type` class attribute for the class and it's parent base classes to build up a `set` of typ
src/sqlfluff/core/parser/segments/base.py:127
↓ 1 callers
Method
__new__
Generate a new class.
src/sqlfluff/core/rules/base.py:324
↓ 1 callers
Method
__post_init__
Optional post-init method called after __init__(). Designed for subclasses to use.
src/sqlfluff/core/parser/lexer.py:160
↓ 1 callers
Method
__resolve_selectable_wildcard
Attempt to resolve a single wildcard (*) within a Selectable. NOTE: This means resolving the number of columns implied by a single *.
src/sqlfluff/rules/ambiguous/AM07.py:86
↓ 1 callers
Method
_alias_info_as_tuples
(self, alias_info: AliasInfo)
src/sqlfluff/rules/references/RF01.py:97
↓ 1 callers
Method
_analyze_table_aliases
(self, query: AL05Query)
src/sqlfluff/rules/aliasing/AL05.py:266
↓ 1 callers
Method
_analyze_table_references
( self, query: RF01Query, dml_target_table: Optional[list[tuple[str, ...]]], d
src/sqlfluff/rules/references/RF01.py:119
↓ 1 callers
Function
_as_rust_lexer_matcher
(lexer_matcher: LexerType, dialect: str, is_subdivide=False)
utils/build_lexers.py:55
↓ 1 callers
Function
_calculate_desired_starting_indent
Calculate the desired starting indent, accounting for leading comma alignment.
src/sqlfluff/utils/reflow/reindent.py:1368
↓ 1 callers
Function
_calculate_indent_compensation
Calculate the number of spaces to compensate for the leading element. This is the number of spaces to remove from the indent of the first element
src/sqlfluff/utils/reflow/reindent.py:1908
↓ 1 callers
Method
_calculate_variant_score
Compute a score for the variant based from size of covered slices. NOTE: We need to map this back to the positions in the original fi
src/sqlfluff/core/templaters/jinja.py:898
↓ 1 callers
Method
_check_add_foreign_key
(self, segment)
src/sqlfluff/rules/postgres/PG01.py:123
↓ 1 callers
Method
_check_concurrently
(self, segment)
src/sqlfluff/rules/postgres/PG01.py:112
↓ 1 callers
Method
_check_create_index
(self, segment)
src/sqlfluff/rules/postgres/PG01.py:99
↓ 1 callers
Method
_check_for_wrapped
Identify a wrapped query (e.g. dbt test) and handle it. If unwrap_wrapped is true, we trim the wrapping from the templated file.
src/sqlfluff/core/templaters/python.py:446
↓ 1 callers
Function
_check_references
Iterate through references and check consistency.
src/sqlfluff/rules/references/RF03.py:172
↓ 1 callers
Method
_coalesce_types
Coalesce to the priority type.
src/sqlfluff/core/templaters/python.py:692
↓ 1 callers
Function
_condense_rule_record
Helper function to condense the rule section of a toml config.
src/sqlfluff/core/config/toml.py:23
↓ 1 callers
Method
_contains_derived_table
Check whether a FROM expression element contains a derived table. A derived table is a subquery (SELECT, set expression, or WITH-compound
src/sqlfluff/rules/aliasing/AL10.py:64
↓ 1 callers
Function
_convert_newlines_to_spaces
Convert newlines to spaces at positions that should use implicit indents.
src/sqlfluff/utils/reflow/reindent.py:1716
↓ 1 callers
Method
_convert_rs_match_result
Convert Rust MatchResult to Python MatchResult. Args: rs_match: RsMatchResult from Rust parser segments:
src/sqlfluff/core/parser/rust_parser.py:322
↓ 1 callers
Function
_convert_rst_admonitions
Convert rst note/warning/important directives to VitePress admonitions.
docsv/scripts/generate-rules-docs.py:209
↓ 1 callers
Function
_convert_rst_code_blocks
Convert rst code-block directives to fenced markdown code blocks.
docsv/scripts/generate-rules-docs.py:74
↓ 1 callers
Function
_convert_rst_list_tables
Convert simple rst list-table directives to markdown tables.
docsv/scripts/generate-rules-docs.py:287
↓ 1 callers
Function
_convert_rst_reference_links
Convert rst reference links and remove their definitions. Supports both forms: - .. _name: https://example.com - .. _`Link Name`: https:/
docsv/scripts/generate-rules-docs.py:416
↓ 1 callers
Method
_convert_to_inst
Convert single Grammar node to GrammarInst fields.
utils/build_parsers.py:361
↓ 1 callers
Method
_crawl_tree
Crawl the tree looking for occurrences of the undeclared values.
src/sqlfluff/core/templaters/jinja.py:368
↓ 1 callers
Function
_create_base_is_null_sequence
( is_upper: bool, operator_raw: str, )
src/sqlfluff/rules/convention/CV05.py:111
↓ 1 callers
Method
_create_begin_end_fixes
Create fixes to wrap the procedure body in BEGIN/END.
src/sqlfluff/rules/tsql/TQ02.py:113
↓ 1 callers
Function
_create_cte_seg
( alias_name: str, subquery: BaseSegment, case_preference: str, dialect: Dialect )
src/sqlfluff/rules/structure/ST05.py:543
↓ 1 callers
Method
_create_pool
( cls, processes: int, initializer: Callable[[], None] )
src/sqlfluff/core/linter/runner.py:265
↓ 1 callers
Function
_create_table_ref
(table_name: str, dialect: Dialect)
src/sqlfluff/rules/structure/ST05.py:566
↓ 1 callers
Method
_cross_join_supported
(context: RuleContext)
src/sqlfluff/rules/ambiguous/AM08.py:108
↓ 1 callers
Function
_determine_aligned_inline_spacing
Work out spacing for instance of an `align` constraint. Args: root_segment: The root segment to search within. whitespace_seg: Th
src/sqlfluff/utils/reflow/respace.py:295
↓ 1 callers
Method
_dialect_supports_dot_access
(self, dialect: Dialect)
src/sqlfluff/rules/references/RF01.py:354
↓ 1 callers
Function
_discover_plugins
Uses the same mechanism as pluggy to introspect available plugins. This method is then intended to allow loading of plugins individually, for
src/sqlfluff/core/plugin/host.py:42
↓ 1 callers
Method
_ensure_final_semicolon
( self, parent_segment: BaseSegment )
src/sqlfluff/rules/convention/CV06.py:338
↓ 1 callers
Method
_eval
(self, context)
test/core/errors_test.py:19
↓ 1 callers
Method
_eval
Evaluate this rule against the current context. This should indicate whether a linting violation has occurred and/or whether there is
src/sqlfluff/core/rules/base.py:465
↓ 1 callers
Method
_eval_gen
(self, context: RuleContext)
src/sqlfluff/rules/structure/ST10.py:54
↓ 1 callers
Method
_eval_gen
(self, context: RuleContext)
src/sqlfluff/rules/convention/CV12.py:67
↓ 1 callers
Method
_eval_single_select_target_element
( self, select_targets_info, context: RuleContext )
src/sqlfluff/rules/layout/LT09.py:258
↓ 1 callers
Method
_exclude_macros
Determines if a macro is within the exclude macros path. These macros will be ignored and not loaded into context Args:
src/sqlfluff/core/templaters/jinja.py:1126
↓ 1 callers
Function
_extract_alignment_config
Helper function to break apart an alignment config. Returns: Tuple of (segment_type, align_within, align_scope, align_space) - s
src/sqlfluff/utils/reflow/respace.py:567
↓ 1 callers
Function
_extract_cols_from_using
(join_clause: Segments, using_segs: Segments)
src/sqlfluff/rules/structure/ST07.py:150
↓ 1 callers
Function
_extract_deletion_sequence_and_anchor
( join_clause: Segments, )
src/sqlfluff/rules/structure/ST07.py:191
↓ 1 callers
Function
_extract_error_detail
Serialise an exception into a string for reuse in other messages.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:82
↓ 1 callers
Method
_extract_ignore_from_comment
Extract ignore mask entries from a comment segment.
src/sqlfluff/core/rules/noqa.py:143
↓ 1 callers
Method
_extract_libraries_from_config
Extracts libraries from the given configuration. This function iterates over the modules in the library path and imports them dynamic
src/sqlfluff/core/templaters/jinja.py:295
↓ 1 callers
Method
_extract_macros_from_config
Take a config and load any macros from it. Args: config: The config to extract macros from. env: The environment.
src/sqlfluff/core/templaters/jinja.py:228
↓ 1 callers
Method
_extract_macros_from_path
Take a path and extract macros from it. Args: path (list[str]): A list of paths. env (Environment): The environment o
src/sqlfluff/core/templaters/jinja.py:164
↓ 1 callers
Method
_extract_references_from_select
( self, segment: BaseSegment )
src/sqlfluff/rules/structure/ST11.py:140
↓ 1 callers
Method
_extract_subqueries
Given a Selectable, extract subqueries.
src/sqlfluff/utils/analysis/query.py:275
↓ 1 callers
Function
_extract_whats_changed_section
Return the draft release content starting at the What's Changed heading. GitHub draft releases include a boilerplate Highlights section. When a
util.py:21
↓ 1 callers
Method
_filter_table_expressions
( cls, base_table, from_expression_elements )
src/sqlfluff/rules/aliasing/AL07.py:154
↓ 1 callers
Method
_filter_violations_single_line
Filter a list of violations based on this single line noqa. Also record whether this class was _used_ in any of that filtering. The
src/sqlfluff/core/rules/noqa.py:26
↓ 1 callers
Method
_find_raw_at_src_idx
Recursively search to find a raw segment for a position in the source. NOTE: This assumes it's not being called on a `raw`. In the c
src/sqlfluff/rules/jinja/JJ01.py:87
↓ 1 callers
Method
_find_skip_reason
Return string reason if model okay to skip, otherwise None.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:614
↓ 1 callers
Method
_find_sql_variables
Get any `DECLARE`d variables in the whole of the linted file. This assumes that the declare statement is going to be used before any referenc
src/sqlfluff/rules/references/RF02.py:172
↓ 1 callers
Function
_fix_long_line_with_comment
Fix long line by moving trailing comments if possible. This method (unlike the ones for normal lines), just returns a new `elements` argument
src/sqlfluff/utils/reflow/reindent.py:2195
↓ 1 callers
Function
_fix_long_line_with_fractional_targets
Work out fixes for splitting a long line at locations like operators. NOTE: This mutates `elements` to avoid copying. This is a helper funct
src/sqlfluff/utils/reflow/reindent.py:2293
↓ 1 callers
Function
_fix_long_line_with_integer_targets
Work out fixes for splitting a long line at locations like indents. NOTE: This mutates `elements` to avoid copying. This is a helper functio
src/sqlfluff/utils/reflow/reindent.py:2316
↓ 1 callers
Function
_flush_metas
Position any new meta segments relative to the non code section. It's important that we position the new meta segments appropriately around a
src/sqlfluff/core/parser/grammar/sequence.py:36
↓ 1 callers
Method
_followed_by_qualify
(self, context: RuleContext, alias: AliasInfo)
src/sqlfluff/rules/aliasing/AL05.py:199
↓ 1 callers
Method
_format_config
Format the config of a `Linter`.
src/sqlfluff/cli/formatters.py:122
↓ 1 callers
Method
_format_file_violations
Format a set of violations in a `LintingResult`.
src/sqlfluff/cli/formatters.py:222
↓ 1 callers
Method
_format_line_and_pos
Format line and position elements for consistent display. Args: line_no: Line number (None if not available) line_pos
src/sqlfluff/cli/formatters.py:423
↓ 1 callers
Method
_format_path
Format paths.
src/sqlfluff/cli/formatters.py:163
↓ 1 callers
Method
_format_rule_description
Format individual rule. This is a helper function in .format_rules().
src/sqlfluff/cli/formatters.py:551
↓ 1 callers
Method
_generate_indent_stats
Generate the change in intended indent balance. This is the main logic which powers .get_indent_impulse()
src/sqlfluff/utils/reflow/elements.py:384
↓ 1 callers
Function
_generate_join_conditions
( table_a_ref: str, table_b_ref: str, columns: list[str] )
src/sqlfluff/rules/structure/ST07.py:162
↓ 1 callers
Function
_generate_token_closure
Generate a closure that constructs a token with TokenConfig. This generates a closure matching the TokenGenerator signature that internally u
utils/build_lexers.py:217
↓ 1 callers
Method
_generate_violations_for_undefined_variables
Generates violations for any undefined variables.
src/sqlfluff/core/templaters/jinja.py:663
↓ 1 callers
Method
_get_additional_allowed_characters
Returns additional allowed characters, with adjustments for dialect.
src/sqlfluff/rules/references/RF05.py:58
↓ 1 callers
Function
_get_case_preference
(root_select: Segments)
src/sqlfluff/rules/structure/ST05.py:587
↓ 1 callers
Method
_get_cli_vars
(self)
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:444
↓ 1 callers
Method
_get_dbt_skip_compilation_error
(self)
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:451
↓ 1 callers
Method
_get_env_context
Get the templating context from the config. NOTE: This closely mirrors the `get_context` method which we inherit from the python temp
src/sqlfluff/core/templaters/jinja.py:549
↓ 1 callers
Function
_get_first_select_statement_descendant
Find first SELECT statement segment (if any) in descendants of 'segment'.
src/sqlfluff/rules/structure/ST05.py:342
↓ 1 callers
Method
_get_fix
Given a segment found to have a fix, returns a LintFix for it. May be overridden by subclasses, which is useful when the parse tree s
src/sqlfluff/rules/capitalisation/CP01.py:269
↓ 1 callers
Function
_get_fixture_path
(template_output_folder_path, fname)
plugins/sqlfluff-templater-dbt/test/templater_test.py:155
↓ 1 callers
Method
_get_from_expression_element_function
Extract the function name from a from_expression_element if present.
src/sqlfluff/rules/convention/CV12.py:274
↓ 1 callers
Method
_get_implicit_targets
(self, query: RF01Query)
src/sqlfluff/rules/references/RF01.py:319
↓ 1 callers
Method
_get_indexes
(context: RuleContext)
src/sqlfluff/rules/layout/LT09.py:125
↓ 1 callers
Method
_get_jinja_tracer
Creates a new object derived from JinjaTracer. Derived classes can provide their own tracers with custom functionality.
src/sqlfluff/core/templaters/slicers/tracer.py:409
↓ 1 callers
Function
_get_lambda_argument_columns
( segment: BaseSegment, dialect: Optional[Dialect] )
src/sqlfluff/utils/analysis/select.py:327
↓ 1 callers
Method
_get_loader_search_path
Get the list of Jinja loader search paths from the provided config object. This method searches for a config section specified by the
src/sqlfluff/core/templaters/jinja.py:481
↓ 1 callers
Method
_get_orderby_info
(segment: BaseSegment)
src/sqlfluff/rules/ambiguous/AM03.py:49
↓ 1 callers
Function
_get_pivot_table_aliases
( segment: BaseSegment, dialect: Optional[Dialect] )
src/sqlfluff/utils/analysis/select.py:236
↓ 1 callers
Method
_get_preferred_quoted_identifier
Build a quoted identifier segment for an inserted keyword-quoting fix.
src/sqlfluff/rules/references/RF06.py:322
↓ 1 callers
Method
_get_raw_segment_kwargs
(self)
src/sqlfluff/core/parser/segments/raw.py:280
↓ 1 callers
Function
_get_seg
(class_def: S, dialect: Dialect)
src/sqlfluff/rules/structure/ST05.py:539
↓ 1 callers
Method
_get_segment_class_by_name
Get a segment class by its exact class name from the dialect. Args: segment_name: The segment CLASS name (e.g., "AsAliasO
src/sqlfluff/core/parser/rust_parser.py:290
↓ 1 callers
Method
_get_segment_move_context
( self, target_segment: RawSegment, parent_segment: BaseSegment )
src/sqlfluff/rules/convention/CV06.py:175
↓ 1 callers
Method
_get_select_stmt
(stack: tuple[BaseSegment, ...])
src/sqlfluff/rules/ambiguous/AM08.py:117
↓ 1 callers
Method
_get_select_target_counts
Given a set expression, get the number of select targets in each query. We keep track of the number of columns in each selectable using a
src/sqlfluff/rules/ambiguous/AM07.py:186
↓ 1 callers
Function
_get_struct_alias_refs
Get the ids of object references that are aliases inside STRUCT functions. In dialects like Databricks, SparkSQL, and Hive, STRUCT() is parsed as
src/sqlfluff/utils/analysis/select.py:29
← previous
next →
601–700 of 2,340, ranked by callers