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
Method
_eval
Join/From clauses should not contain subqueries. Use CTEs instead.
src/sqlfluff/rules/structure/ST05.py:110
Method
_eval
(self, context: RuleContext)
src/sqlfluff/rules/structure/ST03.py:71
Method
_eval
Fully qualify JOINs.
src/sqlfluff/rules/ambiguous/AM05.py:49
Method
_eval
Inconsistent column references in GROUP BY/ORDER BY clauses.
src/sqlfluff/rules/ambiguous/AM06.py:97
Method
_eval
All queries in set expression should return the same number of columns.
src/sqlfluff/rules/ambiguous/AM07.py:207
Method
_eval
Ambiguous use of DISTINCT in select statement with GROUP BY.
src/sqlfluff/rules/ambiguous/AM01.py:43
Method
_eval
Check if LIMIT and OFFSET are used without ORDER BY.
src/sqlfluff/rules/ambiguous/AM09.py:43
Method
_eval
Look for UNION keyword not immediately followed by DISTINCT or ALL. Note that UNION DISTINCT is valid, rule only applies to bare UNION.
src/sqlfluff/rules/ambiguous/AM02.py:47
Method
_eval
Find joins without ON clause. Fix them into CROSS JOIN (if dialect allows it).
src/sqlfluff/rules/ambiguous/AM08.py:46
Method
_eval
Ambiguous ordering directions for columns in order by clause. This rule checks if some ORDER BY columns explicitly specify ASC or DES
src/sqlfluff/rules/ambiguous/AM03.py:83
Method
_eval
Outermost query should produce known number of columns.
src/sqlfluff/rules/ambiguous/AM04.py:139
Method
_eval
Inconsistent capitalisation of keywords. We use the `memory` feature here to keep track of cases known to be INconsistent with what w
src/sqlfluff/rules/capitalisation/CP01.py:69
Method
_eval
Inconsistent capitalisation of datatypes. We use the `memory` feature here to keep track of cases known to be inconsistent with what
src/sqlfluff/rules/capitalisation/CP05.py:64
Method
_eval
(self, context: RuleContext)
src/sqlfluff/rules/capitalisation/CP02.py:98
Method
_eval
(self, context: RuleContext)
src/sqlfluff/rules/references/RF01.py:72
Method
_eval
Override base class for dialects that use structs, or SELECT aliases.
src/sqlfluff/rules/references/RF03.py:83
Method
_eval
Keywords should not be used as identifiers.
src/sqlfluff/rules/references/RF04.py:57
Method
_eval
Unnecessary quoted identifier.
src/sqlfluff/rules/references/RF06.py:155
Method
_eval
Do not use special characters in object names.
src/sqlfluff/rules/references/RF05.py:71
Method
_eval
Find rule violations and provide fixes.
src/sqlfluff/rules/convention/CV04.py:64
Method
_eval
Relational operators should not be used to check for NULL values.
src/sqlfluff/rules/convention/CV05.py:47
Method
_eval
Statements must end with a semi-colon.
src/sqlfluff/rules/convention/CV06.py:467
Method
_eval
Use LEFT JOIN instead of RIGHT JOIN.
src/sqlfluff/rules/convention/CV08.py:46
Method
_eval
Enforce consistent "not equal to" style.
src/sqlfluff/rules/convention/CV01.py:37
Method
_eval
Trailing commas within select clause.
src/sqlfluff/rules/convention/CV03.py:47
Method
_eval
Use ``COALESCE`` instead of ``IFNULL`` or ``NVL``.
src/sqlfluff/rules/convention/CV02.py:47
Method
_eval
Top-level statements should not be wrapped in brackets.
src/sqlfluff/rules/convention/CV07.py:73
Method
_eval
(self, context: RuleContext)
src/sqlfluff/rules/convention/CV10.py:91
Method
_eval
Enforce consistent type casting style.
src/sqlfluff/rules/convention/CV11.py:205
Method
_eval
(self, context: RuleContext)
src/sqlfluff/rules/convention/CV09.py:60
Method
_eval
Find joins with WHERE clause. Fix them into JOIN ON.
src/sqlfluff/rules/convention/CV12.py:60
Method
_eval
Procedure bodies with multiple statements should be wrapped in BEGIN/END.
src/sqlfluff/rules/tsql/TQ02.py:65
Method
_eval
Remove empty batches.
src/sqlfluff/rules/tsql/TQ03.py:49
Method
_eval
r"""``SP_`` prefix should not be used for user-defined stored procedures.
src/sqlfluff/rules/tsql/TQ01.py:61
Method
_eval
We should not ORDER BY forbidden_columns.
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/rules.py:54
Function
_generate_test_segments_func
Roughly generate test segments. This function isn't totally robust, but good enough for testing. Use with caution.
test/conftest.py:187
Method
_get_fix
(self, segment: BaseSegment, fixed_raw: str)
src/sqlfluff/rules/capitalisation/CP03.py:53
Method
_get_jinja_analyzer
(self, raw_str: str, env: Environment)
test/core/templaters/jinja_test.py:1078
Method
_get_jinja_env
(self, config=None)
test/core/templaters/jinja_test.py:1073
Function
_get_sequence
()
test/cli/helpers_test.py:63
Method
_get_tag_configuration
(cls, tag: str)
test/core/templaters/jinja_test.py:855
Method
_hash
Cache the hash property to avoid recalculating it often.
src/sqlfluff/core/parser/segments/base.py:259
Method
_init_global
For the parallel runners indicate that we're not in the main thread.
src/sqlfluff/core/linter/runner.py:259
Method
_init_global
(cls)
src/sqlfluff/core/linter/runner.py:301
Method
_iter_reference_parts
Extract the elements of a reference and yield.
src/sqlfluff/dialects/dialect_bigquery.py:1762
Method
_lint_references_and_aliases
( self, table_aliases: list[AliasInfo], standalone_aliases: list[BaseSegment],
src/sqlfluff/rules/references/RF02.py:55
Function
_load_configfile
Load ignore specs from a standard config file. This function leverages the caching used in the config module to ensure that anything loaded h
src/sqlfluff/core/linter/discovery.py:76
Function
_load_ignorefile
Load a sqlfluffignore file, returning the parsed spec.
src/sqlfluff/core/linter/discovery.py:68
Function
_load_result
(*args, **kwargs)
test/core/parser/lexer_test.py:208
Function
_load_result
(*args, **kwargs)
test/core/templaters/jinja_test.py:1087
Method
_log_apply_fixes_check_issue
( message: str, *args: Any )
src/sqlfluff/core/parser/segments/base.py:1299
Function
_log_critical_errors
(error: Exception)
test/conftest.py:277
Method
_map
Map using imap unordered. We use this so we can iterate through results as they arrive, and while other files are still being process
src/sqlfluff/core/linter/runner.py:312
Method
_map
Map using imap. We use this so we can iterate through results as they arrive, and while other files are still being processed.
src/sqlfluff/core/linter/runner.py:338
Method
_match
Use regexes to match chunks.
src/sqlfluff/core/parser/lexer.py:321
Method
_non_comments
Returns only the non-comment elements of this segment.
src/sqlfluff/core/parser/segments/base.py:308
Method
_object_hierarchy_parts
(self, sig_node)
docs/source/_ext/sqlfluff_domain.py:64
Method
_pos_start
(seg)
src/sqlfluff/rules/structure/ST12.py:59
Method
_pos_stop
(seg)
src/sqlfluff/rules/structure/ST12.py:70
Function
_render_func
Create a dummy render func. Importantly one that does actually allow different content to be added.
plugins/sqlfluff-templater-dbt/test/templater_test.py:248
Method
_self_impl
Return an instance of the class itself. Args: *args: Variable length argument list. **kwargs: Arbitrary keyword argum
src/sqlfluff/core/templaters/jinja.py:1198
Method
_sequence
(self)
src/sqlfluff/cli/helpers.py:91
Function
_statement
(*args, **kwargs)
test/core/parser/lexer_test.py:204
Function
_statement
(*args, **kwargs)
test/core/templaters/jinja_test.py:1082
Function
_structural_parse_mode_test
( test_segment_seeds: list[str], grammar_class: type[BaseGrammar], grammar_argument_se
test/core/parser/grammar/conftest.py:20
Method
_suffix
Return any extra output required at the end when logging. Meta classes have not much to say here so just stay blank.
src/sqlfluff/core/parser/segments/meta.py:56
Method
_suffix
If present, output the block uuid.
src/sqlfluff/core/parser/segments/meta.py:138
Method
_suffix
Also output what it's a placeholder for.
src/sqlfluff/core/parser/segments/meta.py:210
Method
_suffix
Return any extra output required at the end when logging. NB Override this for specific subclasses if we want extra output. Returns:
src/sqlfluff/core/parser/segments/raw.py:239
Method
_suffix
Return any extra output required at the end when logging. NB Override this for specific subclasses if we want extra output.
src/sqlfluff/core/parser/segments/base.py:1339
Method
_toc_entry_name
(self, sig_node)
docs/source/_ext/sqlfluff_domain.py:67
Function
_validate_dialect_specific_statements
This validates one or multiple statements against specified segment class. It even validates the number of parsed statements with the number of e
test/dialects/conftest.py:95
Method
_whitespace_only_between
(a, b)
src/sqlfluff/rules/structure/ST12.py:112
Function
_wrapped
( self: Any, *, in_str: str, fname: str, config: Optional[FluffConfig]
src/sqlfluff/core/templaters/base.py:47
Method
add_target_and_index
Hook to add the permalink and index entries.
docs/source/_ext/sqlfluff_domain.py:48
Method
all
Do all the templated slices match?
src/sqlfluff/utils/functional/templated_file_slices.py:26
Method
all
Do all the raw slices match?
src/sqlfluff/utils/functional/raw_file_slices.py:24
Method
any
Do any of the templated slices match?
src/sqlfluff/utils/functional/templated_file_slices.py:35
Method
any
Do any of the raw slices match?
src/sqlfluff/utils/functional/raw_file_slices.py:31
Method
cache_hit_rate
Return cache hit rate as float 0-1.
utils/compare_parser_metrics.py:43
Method
cache_key
A string to use for cache keying. This string should be unique at the parsing stage such that if there has already been a match again
src/sqlfluff/core/parser/matchable.py:69
Method
cache_key
Get the cache key for the matcher. NOTE: In this case, this class is a bit of a singleton and so we don't need a unique UUID in the s
src/sqlfluff/core/parser/grammar/noncode.py:35
Method
cache_key
Get the cache key for the matcher.
src/sqlfluff/core/parser/grammar/lookbehind.py:55
Method
cache_key
Return the cache key for this segment definition. NOTE: The key itself is generated on _definition_ by the metaclass.
src/sqlfluff/core/parser/segments/base.py:585
Function
cached_method_for_parse_context
A decorator to cache the output of this method for a given parse context. This cache automatically invalidates if the uuid of the parse conte
src/sqlfluff/core/parser/grammar/base.py:27
Method
check_tuples
Make a list of check_tuples. This assumes that all the violations found are linting violations. If they don't then this function
src/sqlfluff/core/linter/linted_file.py:78
Method
check_tuples
Fetch all check_tuples from all contained `LintedDir` objects. Returns: A list of check tuples.
src/sqlfluff/core/linter/linting_result.py:55
Method
check_tuples_by_path
Fetch all check_tuples from all contained `LintedDir` objects. Returns: A dict, with lists of tuples grouped by path.
src/sqlfluff/core/linter/linting_result.py:71
Method
class_types
Get the set of contained class types. Parallel to `BaseSegment.class_types`
src/sqlfluff/utils/reflow/elements.py:70
Method
class_types
The set of full types for this segment, including inherited. Add the surrogate type for raw segments.
src/sqlfluff/core/parser/segments/raw.py:129
Method
class_types
The set of types for this segment.
src/sqlfluff/core/parser/segments/base.py:342
Function
clean_tests
Clear up the tests directory. NB: Using scripts allows platform independence Makes a new one afterward
util.py:44
Function
cli_format
Autoformat SQL files. This effectively force applies `sqlfluff fix` with a known subset of fairly stable rules. Enabled rules are ignored, bu
src/sqlfluff/cli/commands.py:1447
Method
close
Close output stream.
src/sqlfluff/cli/outputstream.py:24
Method
closing_indent_balance
(self)
src/sqlfluff/utils/reflow/reindent.py:86
Function
collect_definition
(match: re.Match[str])
docsv/scripts/generate-rules-docs.py:428
Function
collect_link_def
(match)
docsv/scripts/generate-dialects-docs.py:40
Method
colorize
Optionally use ANSI colour codes to colour a string.
src/sqlfluff/core/formatter.py:78
Function
common_options
Add common options to commands via a decorator. These are applied to all of the cli commands.
src/sqlfluff/cli/commands.py:248
Method
copy
Copy this Matchable. Matchable objects are usually copied during dialect inheritance. One dialect might make a copy (usually with som
src/sqlfluff/core/parser/matchable.py:52
← previous
next →
1,301–1,400 of 2,340, ranked by callers