MCPcopy Create free account

hub / github.com/sqlfluff/sqlfluff / functions

Functions2,340 in github.com/sqlfluff/sqlfluff

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
Methodadd_target_and_index
Hook to add the permalink and index entries.
docs/source/_ext/sqlfluff_domain.py:48
Methodall
Do all the templated slices match?
src/sqlfluff/utils/functional/templated_file_slices.py:26
Methodall
Do all the raw slices match?
src/sqlfluff/utils/functional/raw_file_slices.py:24
Methodany
Do any of the templated slices match?
src/sqlfluff/utils/functional/templated_file_slices.py:35
Methodany
Do any of the raw slices match?
src/sqlfluff/utils/functional/raw_file_slices.py:31
Methodcache_hit_rate
Return cache hit rate as float 0-1.
utils/compare_parser_metrics.py:43
Methodcache_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
Methodcache_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
Methodcache_key
Get the cache key for the matcher.
src/sqlfluff/core/parser/grammar/lookbehind.py:55
Methodcache_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
Functioncached_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
Methodcheck_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
Methodcheck_tuples
Fetch all check_tuples from all contained `LintedDir` objects. Returns: A list of check tuples.
src/sqlfluff/core/linter/linting_result.py:55
Methodcheck_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
Methodclass_types
Get the set of contained class types. Parallel to `BaseSegment.class_types`
src/sqlfluff/utils/reflow/elements.py:70
Methodclass_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
Methodclass_types
The set of types for this segment.
src/sqlfluff/core/parser/segments/base.py:342
Functionclean_tests
Clear up the tests directory. NB: Using scripts allows platform independence Makes a new one afterward
util.py:44
Functioncli_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
Methodclose
Close output stream.
src/sqlfluff/cli/outputstream.py:24
Methodclosing_indent_balance
(self)
src/sqlfluff/utils/reflow/reindent.py:86
Functioncollect_definition
(match: re.Match[str])
docsv/scripts/generate-rules-docs.py:428
Functioncollect_link_def
(match)
docsv/scripts/generate-dialects-docs.py:40
Methodcolorize
Optionally use ANSI colour codes to colour a string.
src/sqlfluff/core/formatter.py:78
Functioncommon_options
Add common options to commands via a decorator. These are applied to all of the cli commands.
src/sqlfluff/cli/commands.py:248
Methodcopy
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
← previousnext →1,301–1,400 of 2,340, ranked by callers