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
handle_signature
Handle the initial signature of the node. This formats the header of the section.
docs/source/_ext/sqlfluff_domain.py:32
Method
ignore_words_list
Words that the rule should ignore. Cached so that it's only evaluated on the first pass.
src/sqlfluff/rules/references/RF06.py:312
Method
imap_unordered
(self, func, iterable)
test/core/linter/linter_test.py:642
Function
import_without_pytest
(name, *args, **kwargs)
test/utils/testing/conditional_imports_test.py:72
Function
instrumented_check
(self, loc_key, matcher_key)
utils/compare_parser_metrics.py:143
Function
instrumented_longest_match
(segments, matchers, idx, parse_context)
utils/compare_parser_metrics.py:162
Function
instrumented_prune
(options, segments, parse_context, start_idx=0)
utils/compare_parser_metrics.py:112
Function
instrumented_put
(self, loc_key, matcher_key, match)
utils/compare_parser_metrics.py:151
Function
instrumented_trim
(segments, idx, terminators, parse_context)
utils/compare_parser_metrics.py:207
Method
invalidate_caches
Invalidate the cached properties. This should be called whenever the segments within this segment is mutated.
src/sqlfluff/core/parser/segments/base.py:802
Function
is_code
Returns a function that checks if segment is code.
src/sqlfluff/utils/functional/segment_predicates.py:54
Method
is_code
Return True if this segment contains any code.
src/sqlfluff/core/parser/segments/base.py:314
Function
is_comment
Returns a function that checks if segment is comment.
src/sqlfluff/utils/functional/segment_predicates.py:63
Method
is_comment
Return True if this is entirely made of comments.
src/sqlfluff/core/parser/segments/base.py:327
Method
is_first_linter_pass
()
src/sqlfluff/core/linter/linter.py:520
Function
is_meta
Returns a function that checks if segment is meta.
src/sqlfluff/utils/functional/segment_predicates.py:72
Method
is_optional
Return whether this element is optional.
src/sqlfluff/core/parser/matchable.py:24
Method
is_optional
Return whether this element is optional. This is mostly set in the init method, but also in this case, if min_times is zero then this
src/sqlfluff/core/parser/grammar/anyof.py:118
Method
is_optional
Not optional. NOTE: The NonCodeMatcher is only normally only used as a terminator or other special instance matcher. As such the `.si
src/sqlfluff/core/parser/grammar/noncode.py:26
Method
is_optional
Return whether this element is optional. A lookbehind matcher is never optional — it must always be evaluated.
src/sqlfluff/core/parser/grammar/lookbehind.py:42
Method
is_optional
Returns False because Segments are never optional. This is used _only_ in the `Sequence` & `Bracketed` grammars to indicate optional
src/sqlfluff/core/parser/segments/base.py:593
Function
is_raw
Returns a function that checks if segment is raw.
src/sqlfluff/utils/functional/segment_predicates.py:81
Method
is_self_match
Does this segment match the relevant criteria. We use the _direct_ child set here so that if any of the direct child segments match a
src/sqlfluff/core/rules/crawlers.py:139
Function
is_slice_type
Returns a function that determines if segment is one of the types.
src/sqlfluff/utils/functional/raw_file_slice_predicates.py:17
Function
is_slice_type
Returns a function that determines if segment is one the types.
src/sqlfluff/utils/functional/templated_file_slice_predicates.py:17
Function
is_templated
Returns a function that checks if segment is templated.
src/sqlfluff/utils/functional/segment_predicates.py:99
Method
is_templated
Returns True if the segment includes any templated code. This is a simple, very efficient check that doesn't require looking up the R
src/sqlfluff/core/parser/segments/base.py:419
Method
is_valid
Returns True if valid combination of fixes for anchor. Cases: * 0-1 fixes of any type: Valid * 2 fixes: Valid if and only if
src/sqlfluff/core/linter/fix.py:75
Method
is_whitespace
Return True if this segment is entirely whitespace.
src/sqlfluff/core/parser/segments/base.py:332
Method
iter_raw_references
Generate a list of reference strings and elements. Each element is a tuple of (str, segment). If some are split, then a segment may a
src/sqlfluff/dialects/dialect_ansi.py:1827
Method
iter_unparsables
Iterate through any unparsables. As this is an unparsable, it should yield itself.
src/sqlfluff/core/parser/segments/base.py:1346
Method
join
(self)
test/core/linter/linter_test.py:651
Function
large_file_check
Raise an exception if the file is over a defined size. Designed to be implemented as a decorator on `.process()` methods. If no config is pr
src/sqlfluff/core/templaters/base.py:38
Method
late_binding_macro
(macro_name: str)
src/sqlfluff/core/templaters/jinja.py:602
Method
line_no
Return the line number in the source.
src/sqlfluff/core/parser/markers.py:159
Method
line_pos
Return the line position in the source.
src/sqlfluff/core/parser/markers.py:164
Method
lint_fix_parsed
(cls, *args, **kwargs)
test/cli/commands_test.py:1417
Function
lint_options
Add lint operation options to commands via a decorator. These are cli commands that do linting, i.e. `lint` and `fix`.
src/sqlfluff/cli/commands.py:432
Function
list_rules
Return a list of available rule tuples.
src/sqlfluff/api/info.py:8
Method
load_config_resource
Load a config resource. NOTE: Deprecated classmethod maintained because it was in our example plugin for a long while. Remove once th
src/sqlfluff/core/config/loader.py:365
Function
load_default_config
Loads the default configuration for the plugin.
src/sqlfluff/core/plugin/lib.py:32
Function
load_default_config
Loads the default configuration for the plugin.
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/__init__.py:42
Function
load_yaml
Load a yaml structure and process it into a tuple.
test/conftest.py:162
Function
logging_cleanup
This gracefully handles logging issues at session teardown. Removes handlers from all loggers. Autouse applies this to all tests in this file
test/cli/commands_test.py:50
Function
make_result_tuple
Make a comparison tuple for test matching.
test/core/parser/match_algorithms_test.py:53
Method
match
Match against this matcher.
src/sqlfluff/core/parser/matchable.py:44
Method
match
Matches... Anything. Most useful in match grammars, where a later parse grammar will work out what's inside. NOTE: This gram
src/sqlfluff/core/parser/grammar/base.py:453
Method
match
Always return a failed (empty) match.
src/sqlfluff/core/parser/grammar/base.py:495
Method
match
Match a bracketed sequence of elements. This implementation matches a bracketed expression without recursion or seeking ahead.
src/sqlfluff/core/parser/grammar/sequence.py:463
Method
match
If enabled, return a single insert of the new segment.
src/sqlfluff/core/parser/grammar/conditional.py:96
Method
match
Match against any of the elements a relevant number of times. If it matches multiple, it returns the longest, and if any are the same
src/sqlfluff/core/parser/grammar/anyof.py:126
Method
match
Match any starting non-code segments.
src/sqlfluff/core/parser/grammar/noncode.py:44
Method
match
Only useful as a terminator. NOTE: Coverage of this method is poor, because in typical use as a terminator - the `.simple()` method c
src/sqlfluff/core/parser/segments/bracketed.py:97
Method
match_success_rate
Return match success rate.
utils/compare_parser_metrics.py:56
Function
matchable_to_const_name
Convert a segment class name to a token name.
utils/build_parsers.py:1621
Method
measured_lines
Return list of the lines in src_path that were measured.
src/sqlfluff/diff_quality_plugin.py:118
Function
mock_xdg_home
Sets the XDG_CONFIG_HOME variable.
test/core/config/loader_test.py:39
Method
ms_per_token
Return parse time per token in ms.
utils/compare_parser_metrics.py:70
Function
normalise_paths
Test normalising paths. NB Paths on difference platforms might look different, so this makes them comparable.
test/core/linter/linter_test.py:70
Function
not_
Returns a function that computes: not fn().
src/sqlfluff/utils/functional/segment_predicates.py:135
Method
num_violations
Count the number of violations in the result.
src/sqlfluff/core/linter/linting_result.py:82
Function
or_
Returns a function that computes the functions or-ed together.
src/sqlfluff/utils/functional/segment_predicates.py:126
Method
parent_stack
Returns a Segments object for context.parent_stack.
src/sqlfluff/utils/functional/context.py:21
Function
parse
Parse SQL files and just spit out the result. PATH is the path to a sql file or directory to lint. This can be either a file ('path/to/file.s
src/sqlfluff/cli/commands.py:1624
Function
parse
Parse a SQL string. Args: sql (:obj:`str`): The SQL to be parsed. dialect (:obj:`Optional[str]`, optional): A reference to the di
src/sqlfluff/api/simple.py:168
Method
parse_reports
Parse report output. Not used by SQLFluff.
src/sqlfluff/diff_quality_plugin.py:36
Function
path_exists
Patch for os.path.exists which depends on test parameters. Returns: True, unless `default_exists` is `False` and the path passed
test/core/config/loader_test.py:248
Method
persist_changes
Run all the fixes for all the files and return a dict.
src/sqlfluff/core/linter/linting_result.py:193
Method
pos_marker
Get the first position marker of the element.
src/sqlfluff/utils/reflow/elements.py:83
Method
process
Add the code element to the logging message before emit.
src/sqlfluff/core/rules/base.py:72
Method
process_with_variants
Yield the same templated file twice with duplicate errors.
test/core/linter/linter_test.py:48
Function
profiles_dir
Returns the dbt project directory.
plugins/sqlfluff-templater-dbt/test/conftest.py:57
Function
project_dir
Returns the dbt project directory.
plugins/sqlfluff-templater-dbt/test/conftest.py:51
Method
pruning_rate
Return pruning rate (% of options dropped).
utils/compare_parser_metrics.py:49
Function
pytest_generate_tests
Generate yaml test cases from file. This is a predefined pytest hook which allows us to parametrize all other test cases defined in this modu
test/rules/yaml_test_cases_test.py:14
Function
pytest_report_header
Return a list of strings to be displayed in the header of the report.
plugins/sqlfluff-templater-dbt/test/conftest.py:15
Function
quoted_presenter
Re-presenter which always double quotes string values needing escapes.
src/sqlfluff/cli/commands.py:1550
Function
raise_critical_errors_after_fix
Raises errors that break the Fix process. These errors are otherwise swallowed to allow the lint messages to reach the end user.
test/conftest.py:269
Function
raise_error_apply_fixes_check_issue
(message, *args)
test/conftest.py:295
Function
raise_error_conflicting_fixes_same_anchor
(message: str)
test/conftest.py:299
Method
raw
Get the current raw representation.
src/sqlfluff/utils/reflow/elements.py:78
Method
raw
Returns the raw segment.
src/sqlfluff/core/parser/segments/raw.py:114
Method
raw
Make a string from the segments of this segment.
src/sqlfluff/core/parser/segments/base.py:337
Function
raw_is
Returns a function that determines if segment matches one of the raw inputs.
src/sqlfluff/utils/functional/segment_predicates.py:20
Function
raw_seg
Construct a raw segment as a fixture.
test/core/parser/segments/conftest.py:15
Function
raw_segments
Construct a list of raw segments as a fixture.
test/core/linter/fix_test.py:28
Function
raw_segments
Construct a list of raw segments as a fixture.
test/core/parser/segments/conftest.py:9
Method
raw_segments
Returns a Segments object for all the raw segments in the file.
src/sqlfluff/utils/functional/context.py:49
Method
raw_segments
Get raw segments underlying the segments.
src/sqlfluff/utils/functional/segments.py:97
Method
raw_segments
Returns self to be compatible with calls to its superclass.
src/sqlfluff/core/parser/segments/raw.py:124
Method
raw_segments
Returns a list of raw segments in this segment.
src/sqlfluff/core/parser/segments/base.py:379
Method
raw_segments_with_ancestors
Returns a list of raw segments in this segment with the ancestors.
src/sqlfluff/core/parser/segments/base.py:384
Function
raw_slices
Returns raw slices for a segment.
src/sqlfluff/utils/functional/segment_predicates.py:144
Method
raw_slices
Raw slices of the segments, sorted in source file order.
src/sqlfluff/utils/functional/segments.py:74
Method
raw_stack
Returns a Segments object for context.raw_stack.
src/sqlfluff/utils/functional/context.py:42
Method
raw_upper
Returns the raw segment in uppercase.
src/sqlfluff/core/parser/segments/raw.py:119
Method
raw_upper
Make an uppercase string from the segments of this segment.
src/sqlfluff/core/parser/segments/base.py:374
Method
recursive_crawl_all
Recursively crawl all descendant segments.
src/sqlfluff/core/parser/segments/base.py:1066
Function
red_log_filter
(record: logging.LogRecord)
src/sqlfluff/cli/commands.py:194
Function
release
Change version number in the cfg files. NOTE: For fine grained personal access tokens, this requires _write_ access to the "contents" scope.
util.py:112
← previous
next →
1,501–1,600 of 2,340, ranked by callers