Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/sqlfluff/sqlfluff
/ types & classes
Types & classes
2,379 in github.com/sqlfluff/sqlfluff
⨍
Functions
2,340
◇
Types & classes
2,379
↳
Endpoints
59
↓ 12,749 callers
Class
Ref
A kind of meta-grammar that references other grammars by name at runtime.
src/sqlfluff/core/parser/grammar/base.py:322
↓ 7,688 callers
Class
Sequence
Match a specific sequence of elements.
src/sqlfluff/core/parser/grammar/sequence.py:83
↓ 3,432 callers
Class
OneOf
Match any of the elements given once. If it matches multiple, it returns the longest, and if any are the same length it returns the first (un
src/sqlfluff/core/parser/grammar/anyof.py:250
↓ 1,126 callers
Class
Delimited
Match an arbitrary number of elements separated by a delimiter. Note that if there are multiple elements passed in that they will be treated
src/sqlfluff/core/parser/grammar/delimited.py:19
↓ 1,052 callers
Class
Bracketed
Match if a bracketed sequence, with content that matches one of the elements. Note that the contents of the Bracketed Expression are treated as a
src/sqlfluff/core/parser/grammar/sequence.py:374
↓ 356 callers
Class
AnyNumberOf
A more configurable version of OneOf.
src/sqlfluff/core/parser/grammar/anyof.py:59
↓ 261 callers
Class
StringParser
An object which matches and returns raw segments based on strings.
src/sqlfluff/core/parser/parsers.py:172
↓ 189 callers
Class
FluffConfig
The persistent object for internal methods to access configuration. This class is designed to be instantiated once for each file and then be
src/sqlfluff/core/config/fluffconfig.py:37
↓ 168 callers
Class
Linter
The interface class to interact with the linter.
src/sqlfluff/core/linter/linter.py:58
↓ 163 callers
Class
LintResult
A class to hold the results of a rule evaluation. Args: anchor (:obj:`BaseSegment`, optional): A segment which represents the
src/sqlfluff/core/rules/base.py:77
↓ 149 callers
Class
OptionallyBracketed
Hybrid of Bracketed and Sequence: allows brackets but they aren't required. NOTE: This class is greedy on brackets so if they *can* be claimed, t
src/sqlfluff/core/parser/grammar/anyof.py:280
↓ 145 callers
Class
RegexLexer
This RegexLexer matches based on regular expressions.
src/sqlfluff/core/parser/lexer.py:311
↓ 143 callers
Class
TypedParser
An object which matches and returns raw segments based on types.
src/sqlfluff/core/parser/parsers.py:82
↓ 119 callers
Class
AnySetOf
Match any number of the elements but each element can only be matched once.
src/sqlfluff/core/parser/grammar/anyof.py:308
↓ 83 callers
Class
RegexParser
An object which matches and returns raw segments based on a regex.
src/sqlfluff/core/parser/parsers.py:276
↓ 75 callers
Class
Nothing
Matches nothing. Useful for placeholders which might be overwritten by other dialects.
src/sqlfluff/core/parser/grammar/base.py:488
↓ 69 callers
Class
StringLexer
This singleton matcher matches strings exactly. This is the simplest usable matcher, but it also defines some of the mechanisms for more comp
src/sqlfluff/core/parser/lexer.py:131
↓ 66 callers
Class
SegmentSeekerCrawler
A crawler that efficiently searches for specific segment types. The segment type(s) are specified on creation.
src/sqlfluff/core/rules/crawlers.py:48
↓ 65 callers
Class
Anything
Matches anything.
src/sqlfluff/core/parser/grammar/base.py:450
↓ 48 callers
Class
WhitespaceSegment
Segment containing whitespace.
src/sqlfluff/core/parser/segments/common.py:37
↓ 44 callers
Class
MultiStringParser
An object which matches and returns raw segments on a collection of strings.
src/sqlfluff/core/parser/parsers.py:224
↓ 40 callers
Class
Conditional
A grammar which is conditional on the parse context. | NOTE: The Conditional grammar is assumed to be operating | within a Sequence grammar,
src/sqlfluff/core/parser/grammar/conditional.py:12
↓ 37 callers
Class
MatchResult
This should be the default response from any `match` method. All references and indices are in reference to a single root tuple of segments.
src/sqlfluff/core/parser/match_result.py:33
↓ 37 callers
Class
ParseContext
Object to handle the context at hand during parsing. Holds two tiers of references. 1. Persistent config, like references to the dialect or
src/sqlfluff/core/parser/context.py:33
↓ 36 callers
Class
Segments
Encapsulates a sequence of one or more BaseSegments. The segments may or may not be contiguous in a parse tree. Provides useful operations on
src/sqlfluff/utils/functional/segments.py:20
↓ 33 callers
Class
SegmentGenerator
Defines a late-bound dialect object. It returns a single dialect object on expansion. These are defined using a callable, which is only call
src/sqlfluff/core/parser/segments/generator.py:14
↓ 31 callers
Class
SymbolSegment
A segment used for matching single entities which aren't keywords. We rename the segment class here so that descendants of _ProtoKeywordSegme
src/sqlfluff/core/parser/segments/common.py:64
↓ 30 callers
Class
PositionMarker
A reference to a position in a file. Things to note: - This combines the previous functionality of FilePositionMarker and Enric
src/sqlfluff/core/parser/markers.py:18
↓ 29 callers
Class
FunctionalContext
RuleContext written in a "functional" style; simplifies writing rules.
src/sqlfluff/utils/functional/context.py:7
↓ 28 callers
Class
SQLFluffUserError
An error which should be fed back to the user.
src/sqlfluff/core/errors.py:437
↓ 27 callers
Class
JinjaTagConfiguration
Provides information about a Jinja tag and how it affects JinjaAnalyzer behavior. Attributes: block_type (str): The block type that the J
src/sqlfluff/core/templaters/slicers/tracer.py:253
↓ 25 callers
Class
RawFileSlice
A slice referring to a raw file.
src/sqlfluff/core/templaters/base.py:77
↓ 22 callers
Class
KeywordSegment
A segment used for matching single words. We rename the segment class here so that descendants of _ProtoKeywordSegment can use the same funct
src/sqlfluff/core/parser/segments/keyword.py:10
↓ 22 callers
Class
TemplatedFileSlice
A slice referring to a templated file.
src/sqlfluff/core/templaters/base.py:111
↓ 19 callers
Class
GrammarInstData
Data for a single GrammarInst (before serialization to Rust).
utils/build_parsers.py:41
↓ 19 callers
Class
JinjaTemplater
A templater using the jinja2 library. See: https://jinja.palletsprojects.com/
src/sqlfluff/core/templaters/jinja.py:91
↓ 19 callers
Class
SQLParseError
An error which occurred during parsing. Args: segment (:obj:`BaseSegment`, optional): The segment which is relevant for the f
src/sqlfluff/core/errors.py:203
↓ 18 callers
Class
NewlineSegment
Segment containing a newline. NOTE: NewlineSegment does not inherit from WhitespaceSegment. Therefore NewlineSegment.is_type('whitespace') re
src/sqlfluff/core/parser/segments/common.py:47
↓ 18 callers
Class
ReflowPoint
Class for keeping track of editable elements in reflow. This class, and its sibling :obj:`ReflowBlock`, should not normally be manipulated di
src/sqlfluff/utils/reflow/elements.py:305
↓ 15 callers
Class
RawSegment
This is a segment without any subsegments.
src/sqlfluff/core/parser/segments/raw.py:20
↓ 15 callers
Class
SQLTemplaterError
An error which occurred during templating. Args: pos (:obj:`PosMarker`, optional): The position which the error occurred at.
src/sqlfluff/core/errors.py:159
↓ 15 callers
Class
TemplatedFile
A templated SQL file. This is the response of a templaters .process() method and contains both references to the original file and also t
src/sqlfluff/core/templaters/base.py:132
↓ 15 callers
Class
_RemovedConfig
src/sqlfluff/core/config/removed.py:21
↓ 13 callers
Class
RootOnlyCrawler
A crawler that doesn't crawl. This just yields one context on the root-level (topmost) segment of the file.
src/sqlfluff/core/rules/crawlers.py:36
↓ 12 callers
Class
ReflowSequence
Class for keeping track of elements in a reflow operation. This acts as the primary route into using the reflow routines. It acts in a way th
src/sqlfluff/utils/reflow/sequence.py:33
↓ 11 callers
Class
PathStep
An element of the response to BaseSegment.path_to(). Attributes: segment (:obj:`BaseSegment`): The segment in the chain. idx (int
src/sqlfluff/core/parser/segments/base.py:84
↓ 10 callers
Class
FixPatch
An edit patch for a source file.
src/sqlfluff/core/linter/patch.py:17
↓ 10 callers
Class
FunctionWrapper
Class to wrap a callable, for better error handling. When called, it just delegates to the provided callable, but if it is rendered as a stri
src/sqlfluff/core/templaters/builtins/common.py:8
↓ 10 callers
Class
RustParser
Parser wrapper that uses Rust implementation but returns BaseSegment. This is designed to be a drop-in replacement for the Python Parser clas
src/sqlfluff/core/parser/rust_parser.py:43
↓ 9 callers
Class
OptionallyDelimited
Match a number of elements optionally separated by a delimiter. Note that if there are multiple elements passed in that they will be treated
src/sqlfluff/core/parser/grammar/delimited.py:194
↓ 9 callers
Class
Parser
Instantiates parsed queries from a sequence of lexed raw segments.
src/sqlfluff/core/parser/parser.py:14
↓ 8 callers
Class
PlaceholderTemplater
A templater for generic placeholders. Different libraries and tools use different styles of placeholders in order to escape them when running
src/sqlfluff/core/templaters/placeholder.py:63
↓ 8 callers
Class
PythonTemplater
A templater using python format strings. See: https://docs.python.org/3/library/string.html#format-string-syntax For the python templater we
src/sqlfluff/core/templaters/python.py:152
↓ 8 callers
Class
SQLFluffSkipFile
An error returned from a templater to skip a file.
src/sqlfluff/core/errors.py:172
↓ 7 callers
Class
IdentifierSegment
An identifier segment. Defined here for type inheritance.
src/sqlfluff/core/parser/segments/common.py:75
↓ 7 callers
Class
IntermediateFileSlice
An intermediate representation of a partially sliced File.
src/sqlfluff/core/templaters/python.py:24
↓ 7 callers
Class
LexedElement
An element matched during lexing.
src/sqlfluff/core/parser/lexer.py:85
↓ 7 callers
Class
LintFix
A class to hold a potential fix to a linting violation. Args: edit_type (:obj:`str`): One of `create_before`, `create_after`,
src/sqlfluff/core/rules/fix.py:14
↓ 6 callers
Class
FileOutput
Outputs to a specified file.
src/sqlfluff/cli/outputstream.py:46
↓ 6 callers
Class
OutputStreamFormatter
Formatter which writes to an OutputStream. On instantiation, this formatter accepts a function to dispatch messages. Each public method accep
src/sqlfluff/cli/formatters.py:69
↓ 6 callers
Class
PathAndUserErrorHandler
Make an API call but with error handling for the CLI.
src/sqlfluff/cli/commands.py:226
↓ 6 callers
Class
UndefinedRecorder
Similar to jinja2.StrictUndefined, but remembers, not fails.
src/sqlfluff/core/templaters/jinja.py:51
↓ 6 callers
Class
WordSegment
A generic (likely letters only) segment. Defined here for type inheritance. This is the base segment for things like keywords and naked
src/sqlfluff/core/parser/segments/common.py:129
↓ 5 callers
Class
Indent
A segment which is empty but indicates where an indent should be. This segment is always empty, i.e. its raw format is '', but it indicates t
src/sqlfluff/core/parser/segments/meta.py:124
↓ 4 callers
Class
AliasInfo
Details about a table alias.
src/sqlfluff/core/dialects/common.py:8
↓ 4 callers
Class
BaseSegment
The base segment element. This defines the base element which drives both Lexing, Parsing and Linting. A large chunk of the logic which defin
src/sqlfluff/core/parser/segments/base.py:153
↓ 4 callers
Class
Dedent
A segment which is empty but indicates where an dedent should be. This segment is always empty, i.e. its raw format is '', but it indicates t
src/sqlfluff/core/parser/segments/meta.py:160
↓ 4 callers
Class
LexMatch
A class to hold matches from the Lexer.
src/sqlfluff/core/parser/lexer.py:117
↓ 4 callers
Class
RelationEmulator
A class which emulates the `this` class from dbt.
src/sqlfluff/core/templaters/builtins/dbt.py:8
↓ 4 callers
Class
SQLLintError
An error which occurred during linting. In particular we reference the rule here to do extended logging based on the rule in question which c
src/sqlfluff/core/errors.py:292
↓ 4 callers
Class
SourceFix
A stored reference to a fix in the non-templated file.
src/sqlfluff/core/parser/segments/base.py:65
↓ 4 callers
Class
UnparsableSegment
This is a segment which can't be parsed. It indicates a error during parsing.
src/sqlfluff/core/parser/segments/base.py:1320
↓ 3 callers
Class
DeferredRenderTask
A minimal task packet sent to workers when templating is deferred. Instead of templating in the main process and shipping the full RenderedFi
src/sqlfluff/core/linter/common.py:42
↓ 3 callers
Class
Dialect
Serves as the basis for runtime resolution of Grammar. Args: name (:obj:`str`): The name of the dialect, used for lookup. lexer_m
src/sqlfluff/core/dialects/base.py:18
↓ 3 callers
Class
DummyUndefined
Acts as a dummy value to try and avoid template failures. Inherits from jinja2.Undefined so Jinja's default() filter will treat it as a missi
src/sqlfluff/core/templaters/jinja.py:1147
↓ 3 callers
Class
IndentStats
Dataclass to hold summary of indents in a point. Attributes: impulse (int): The net change when summing the impulses of all t
src/sqlfluff/utils/reflow/elements.py:256
↓ 3 callers
Class
LiteralSegment
A literal segment. Defined here for type inheritance.
src/sqlfluff/core/parser/segments/common.py:84
↓ 3 callers
Class
NonCodeMatcher
An object which behaves like a matcher to match non-code.
src/sqlfluff/core/parser/grammar/noncode.py:17
↓ 3 callers
Class
PrecededByMatcher
Matches when the current position is preceded by a keyword sequence. This is used as an ``exclude`` pattern on keyword matchers to prevent th
src/sqlfluff/core/parser/grammar/lookbehind.py:18
↓ 3 callers
Class
PyRsLexer
A wrapper around the sqlfluffrs lexer.
src/sqlfluff/core/parser/lexer.py:917
↓ 3 callers
Class
RawFileSlices
Encapsulates a sequence of one or more RawFileSlice. The slices may or may not be contiguous in a file. Provides useful operations on a seque
src/sqlfluff/utils/functional/raw_file_slices.py:8
↓ 3 callers
Class
RuleFailure
Exception class for reporting lint failure inside deeply nested code.
src/sqlfluff/rules/ambiguous/AM04.py:13
↓ 3 callers
Class
RuleTestCase
Used like a dataclass by rule tests.
src/sqlfluff/utils/testing/rules.py:39
↓ 3 callers
Class
RuleTuple
Rule Tuple object for describing rules.
src/sqlfluff/core/linter/common.py:16
↓ 3 callers
Class
SQLLexError
An error which occurred during lexing. Args: pos (:obj:`PosMarker`, optional): The position which the error occurred at.
src/sqlfluff/core/errors.py:178
↓ 3 callers
Class
Selectable
A "SELECT" query segment.
src/sqlfluff/utils/analysis/query.py:58
↓ 3 callers
Class
TemplateSegment
A segment which is empty but indicates where something should be. This segment is always empty, i.e. its raw format is '', but it indicates t
src/sqlfluff/core/parser/segments/meta.py:175
↓ 3 callers
Class
_IndentPoint
Temporary structure for holding metadata about an indented ReflowPoint. We only evaluate point which either *are* line breaks or contain Inde
src/sqlfluff/utils/reflow/reindent.py:65
↓ 3 callers
Class
_RebreakSpan
A location within a sequence to consider rebreaking.
src/sqlfluff/utils/reflow/rebreak.py:23
↓ 2 callers
Class
BinaryOperatorSegment
A binary operator segment. Defined here for type inheritance. Inherits from RawSegment.
src/sqlfluff/core/parser/segments/common.py:93
↓ 2 callers
Class
DbtConfigArgs
Arguments to load dbt runtime config.
plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py:50
↓ 2 callers
Class
DummyConfig
Minimal config stub exposing a ``get`` method.
test/cli/recursion_limit_test.py:10
↓ 2 callers
Class
DummyLintError
Fake lint error used by tests, similar to SQLLintError.
test/core/rules/noqa_test.py:15
↓ 2 callers
Class
EndOfFile
A meta segment to indicate the end of the file.
src/sqlfluff/core/parser/segments/meta.py:103
↓ 2 callers
Class
LazySequence
A Sequence which only populates on the first access. This is useful for being able to define sequences within the click cli decorators, but t
src/sqlfluff/cli/helpers.py:79
↓ 2 callers
Class
LintedDir
A class to store the idea of a collection of linted files at a single start path. A LintedDir may contain files in subdirectories, but they all s
src/sqlfluff/core/linter/linted_dir.py:32
↓ 2 callers
Class
LintingResult
A class to represent the result of a linting operation. Notably this might be a collection of paths, all with multiple potential files within
src/sqlfluff/core/linter/linting_result.py:34
↓ 2 callers
Class
NoQaDirective
Parsed version of a 'noqa' comment.
src/sqlfluff/core/rules/noqa.py:16
↓ 2 callers
Class
OrderByColumnInfo
For AM03, segment that ends an ORDER BY column and any order provided.
src/sqlfluff/rules/ambiguous/AM03.py:10
↓ 2 callers
Class
ParserMetrics
Container for parser metrics.
utils/compare_parser_metrics.py:11
next →
1–100 of 2,379, ranked by callers