MCPcopy Create free account

hub / github.com/sqlfluff/sqlfluff / functions

Functions2,340 in github.com/sqlfluff/sqlfluff

Methodcopy
Create a copy of this grammar, optionally with differences. This is mainly used in dialect inheritance. Args: insert (:
src/sqlfluff/core/parser/grammar/base.py:222
Functioncore_options
Add core operation options to commands via a decorator. These are applied to the main (but not all) cli commands like `parse`, `lint` and `fi
src/sqlfluff/cli/commands.py:275
Methodcrawl
Yields a RuleContext for each segment the rule should process.
src/sqlfluff/core/rules/crawlers.py:32
Methodcrawl
Yields a RuleContext for each segment the rule should process.
src/sqlfluff/core/rules/crawlers.py:42
Methodcrawl
Yields a RuleContext for each segment the rule should process. We assume that segments are yielded by their parent.
src/sqlfluff/core/rules/crawlers.py:77
Methoddbt_compiler
Loads the dbt compiler.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:303
Methoddbt_config
Loads the dbt config.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:248
Functiondbt_flags
Set dbt flags for dbt templater tests.
plugins/sqlfluff-templater-dbt/test/conftest.py:24
Functiondbt_fluff_config
Returns SQLFluff dbt configuration dictionary.
plugins/sqlfluff-templater-dbt/test/conftest.py:34
Methoddbt_manifest
Loads the dbt manifest.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:315
Functiondbt_project_folder
Fixture for a temporary dbt project directory.
plugins/sqlfluff-templater-dbt/test/conftest.py:71
Methoddbt_selector_method
Loads the dbt selector method.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:330
Functiondbt_templater
Returns an instance of the DbtTemplater.
plugins/sqlfluff-templater-dbt/test/conftest.py:63
Methoddbt_version
Gets the dbt version.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:208
Methoddbt_version_tuple
Gets the dbt version.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:213
Functiondecorator
(func: Callable[..., T])
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:119
Functiondefault_config
Return the default config for reflow tests.
test/utils/reflow/conftest.py:9
Methoddescendant_type_set
The set of all contained types. This is used for rule crawling. NOTE: Does not include the types of the parent segment itself.
src/sqlfluff/core/parser/segments/base.py:350
Functiondialects
Show the current dialects available.
src/sqlfluff/cli/commands.py:624
Functiondiff_cover_report_quality
Returns the SQLFluff plugin. This function is registered as a diff_cover entry point. diff-quality calls it in order to "discover" the SQLFlu
src/sqlfluff/diff_quality_plugin.py:123
Methoddirect_descendant_type_set
The set of all directly child types. This is used for rule crawling. NOTE: Does not include the types of the parent segment itself.
src/sqlfluff/core/parser/segments/base.py:364
Methoddisable_progress_bar
(self)
src/sqlfluff/core/config/__init__.py:68
Methoddiscard_fixes_for_lint_errors_in_files_with_tmp_or_prs_errors
Discard lint fixes for files with templating or parse errors.
src/sqlfluff/core/linter/linting_result.py:222
Methoddispatch_dialect_warning
Dispatch a warning for dialects.
src/sqlfluff/cli/formatters.py:218
Methoddispatch_file_violations
Dispatch any violations found in a file.
src/sqlfluff/cli/formatters.py:259
Methoddispatch_lint_header
Dispatch the header displayed before linting.
src/sqlfluff/cli/formatters.py:195
Methoddispatch_parse_header
Dispatch the header displayed before parsing.
src/sqlfluff/cli/formatters.py:190
Methoddispatch_path
Dispatch paths for display.
src/sqlfluff/cli/formatters.py:167
Methoddispatch_persist_filename
Dispatch filenames during a persist operation.
src/sqlfluff/cli/formatters.py:157
Methoddispatch_processing_header
Dispatch the header displayed before linting.
src/sqlfluff/cli/formatters.py:210
Methoddispatch_template_header
Dispatch the header displayed before templating.
src/sqlfluff/cli/formatters.py:172
Functiondocument_configuration
Add a 'Configuration' section to a Rule docstring.
src/sqlfluff/core/rules/doc_decorators.py:37
Functiondocument_fix_compatible
Mark the rule as fixable in the documentation.
src/sqlfluff/core/rules/doc_decorators.py:17
Functiondocument_groups
Mark the rule as fixable in the documentation.
src/sqlfluff/core/rules/doc_decorators.py:27
Functionds_filter
Date filter.
test/fixtures/templater/jinja_s_filters_in_library/libs/__init__.py:9
Functionecho_capture
Capture ``click.echo`` calls as a list of ``(msg, err)`` tuples.
test/cli/recursion_limit_test.py:25
Methodedit
Create a new segment, with exactly the same position but different content. Returns: A copy of this object with new contents.
src/sqlfluff/core/parser/segments/keyword.py:43
Methodedit
Create a new segment, with exactly the same position but different content. Returns: A copy of this object with new contents.
src/sqlfluff/core/parser/segments/meta.py:267
Methodemit
Behaves like original one except uses `tqdm` to write.
src/sqlfluff/cli/commands.py:97
Functionequals
Return a string that has col = val.
test/fixtures/templater/jinja_r_library_in_macro/libs/bar.py:4
Functionequals
Return a string that has col = val.
test/fixtures/templater/jinja_m_libraries_module/libs/foo/bar/baz.py:4
Functionequals
Return a string that has col = val.
test/fixtures/templater/jinja_j_libraries/libs/bar.py:4
Methodexpand
Expand this object into its true dialect object. The inner function is passed an instance of the current dialect and so has access to
src/sqlfluff/core/parser/segments/generator.py:28
Methodextract_possible_multipart_references
Extract possible multipart references, e.g. schema.table.
src/sqlfluff/dialects/dialect_bigquery.py:1845
Methodextract_possible_references
Extract possible references of a given level. Overrides the parent-class function. BigQuery's support for things like the following:
src/sqlfluff/dialects/dialect_bigquery.py:1812
Functionfail_on_parse_error_after_fix
Cause tests to fail if a lint fix introduces a parse error. In production, we have a couple of functions that, upon detecting a bug in a lint
test/conftest.py:284
Functionfake_echo
(msg, err=False)
test/cli/recursion_limit_test.py:29
Functionfake_set
(limit)
test/cli/recursion_limit_test.py:40
Methodfile_path
File path of a parsed SQL file.
src/sqlfluff/core/parser/segments/file.py:35
Methodfirst_non_whitespace_segment_raw_upper
Returns the first non-whitespace subsegment of this segment.
src/sqlfluff/core/parser/segments/base.py:410
Functionfix
Fix a SQL string. Args: sql (:obj:`str`): The SQL to be fixed. dialect (:obj:`Optional[str]`, optional): A reference to the diale
src/sqlfluff/api/simple.py:115
Methodfixable
Should this error be considered fixable?
src/sqlfluff/core/errors.py:92
Methodfixable
Should this error be considered fixable?
src/sqlfluff/core/errors.py:378
Methodformatted_new_key
Format the new key (assuming it exists) in a way similar to a config file.
src/sqlfluff/core/config/removed.py:35
Methodformatted_old_key
Format the old key in a way similar to a config file.
src/sqlfluff/core/config/removed.py:30
Functionfresh_ansi_dialect
Expand the ansi dialect for use.
test/core/parser/conftest.py:10
Methodfrom_result_segments
Create BracketedSegment from result segments. When called from Rust parser, start_bracket and end_bracket won't be in segment_kwargs,
src/sqlfluff/core/parser/segments/bracketed.py:43
Methodfrom_result_segments
Create an instance of this class from a tuple of matched segments.
src/sqlfluff/core/parser/segments/base.py:1311
Methodfrom_root
Generate a sequence from a root segment. Args: root_segment (:obj:`BaseSegment`): The relevant root segment (usua
src/sqlfluff/utils/reflow/sequence.py:209
Methodfrom_rstoken
Create a RawSegment from an RSQL token.
src/sqlfluff/core/parser/segments/meta.py:87
Methodfrom_rstoken
Create a TemplateSegment from a token.
src/sqlfluff/core/parser/segments/meta.py:303
Methodfrom_string
Loads a config object from a single config string. Args: config_string (str): The config string, assumed to be in ``ini``
src/sqlfluff/core/config/fluffconfig.py:283
Functiongenerate_one_parse_fixture
Parse example SQL file, write parse tree to YAML file.
test/generate_parse_fixture_yml.py:95
Functionget_configs_info
Get rule config validations and descriptions.
src/sqlfluff/core/plugin/lib.py:41
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/layout/__init__.py:8
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/aliasing/__init__.py:8
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/structure/__init__.py:8
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/ambiguous/__init__.py:11
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/capitalisation/__init__.py:8
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/references/__init__.py:8
Functionget_configs_info
Get additional rule config validations and descriptions.
src/sqlfluff/rules/convention/__init__.py:8
Functionget_configs_info
Get rule config validations and descriptions.
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/__init__.py:51
Methodget_eventual_aliases
List the eventual aliases of this from clause. Comes as a list of tuples (table expr, tuple (string, segment, bool)).
src/sqlfluff/dialects/dialect_ansi.py:2098
Methodget_full_qualified_name
Get the fully qualified name of the rule.
docs/source/_ext/sqlfluff_domain.py:104
Methodget_global
Get the singleton loader.
src/sqlfluff/core/config/loader.py:356
Methodget_parent_of
Return the segment immediately containing segment. NB: This is recursive. Args: segment: The segment to look for.
src/sqlfluff/core/rules/base.py:682
Functionget_rules
Get plugin rules. NOTE: All standard rules will eventually be loaded as plugins and so before 2.0.0, once all legacy plugin definitions a
src/sqlfluff/core/plugin/lib.py:14
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/layout/__init__.py:64
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/aliasing/__init__.py:50
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/postgres/__init__.py:14
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/oracle/__init__.py:8
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/jinja/__init__.py:8
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/structure/__init__.py:26
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/ambiguous/__init__.py:29
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/capitalisation/__init__.py:41
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/references/__init__.py:64
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/convention/__init__.py:63
Functionget_rules
Get plugin rules. NOTE: Rules are imported only on fetch to manage import times when rules aren't used.
src/sqlfluff/rules/tsql/__init__.py:14
Functionget_rules
Get plugin rules. NOTE: It is much better that we only import the rule on demand. The root module of the plugin (i.e. this file which contain
plugins/sqlfluff-plugin-example/src/sqlfluff_plugin_example/__init__.py:23
Methodget_segment_or_default
Helper to safely get a child segment or return a default.
src/sqlfluff/rules/convention/CV12.py:277
Methodget_source
( self, environment: Environment, name: str )
src/sqlfluff/core/templaters/jinja.py:419
Methodget_start_point_marker
Get a point marker at the start of this segment.
src/sqlfluff/core/parser/segments/base.py:813
Methodget_table_references
Use parsed tree to extract table references.
src/sqlfluff/dialects/dialect_ansi.py:4284
Methodget_table_references
Use parsed tree to extract table references.
src/sqlfluff/core/parser/segments/file.py:40
Functionget_templaters
Return templaters provided by this test module.
test/utils/reflow/reindent_test.py:76
Functionget_templaters
Get templaters.
src/sqlfluff/core/plugin/lib.py:25
Functionget_templaters
Get templaters.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/__init__.py:8
Functionget_type
Returns a function that gets segment type.
src/sqlfluff/utils/functional/segment_predicates.py:108
Methodget_violations
Return a list of violations in the result.
src/sqlfluff/core/linter/linting_result.py:92
Functionhandle_dbt_errors
A decorator to safely catch dbt exceptions and raise native ones. NOTE: This looks and behaves a lot like a context manager, but it's importa
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:92
← previousnext →1,401–1,500 of 2,340, ranked by callers