Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dbt-labs/dbt-extractor
/ functions
Functions
68 in github.com/dbt-labs/dbt-extractor
⨍
Functions
68
◇
Types & classes
10
↓ 12 callers
Function
assert_none_type_check
(sources: Vec<&str>)
src/extractor.rs:774
↓ 11 callers
Method
to_string
(&self)
src/extractor.rs:234
↓ 9 callers
Function
assert_extraction
(source: &str, expected: Extraction)
tests/integration_tests.rs:8
↓ 7 callers
Method
mappend
monoidal mappend: takes two Extraction values and immutably merges them into a single Extraction value id element: Extraction::new() associative: x.ma
src/extractor.rs:53
↓ 7 callers
Function
text_from_node
tree-sitter nodes do not contain all necessary text values. This maps back to source to retrieve them.
src/extractor.rs:303
↓ 6 callers
Function
child_by_field_name
in the tree-sitter grammar some elements are named, those are the string values used to retrieve children.
src/extractor.rs:288
↓ 5 callers
Function
assert_all_type_check
(sources: Vec<&str>)
src/extractor.rs:764
↓ 5 callers
Function
map_err
change the error of a result value frequently used to wrap exceptions lower on the hierarchy into their parent type
src/extractor.rs:267
↓ 4 callers
Function
assert_produces_tree
(source: &str, expect: ExprT)
src/extractor.rs:785
↓ 4 callers
Function
get_results
(sources: Vec<&str>)
src/extractor.rs:750
↓ 4 callers
Function
named_children
tree-sitter returns a concrete syntax tree. only named elements form the abstract syntax tree.
src/extractor.rs:297
↓ 2 callers
Function
assert_fails_with
(source: &str, expect: ParseError)
src/extractor.rs:796
↓ 2 callers
Function
extract_from_source
public entry point
src/extractor.rs:710
↓ 2 callers
Function
run_tree_sitter
go go gadget tree-sitter!
src/extractor.rs:692
↓ 2 callers
Function
strip_first_and_last
generally used to strip quotes off strings from the source file
src/extractor.rs:311
↓ 2 callers
Function
to_ast
transforms the tree-sitter tree structure which relies on a lot of string matching into the more structured ExprU type. This allows the rust compiler
src/extractor.rs:320
↓ 2 callers
Function
type_check
Attempts to convert the untypted ast into the typed ast, returning errors when necessary.
src/extractor.rs:443
↓ 1 callers
Function
convert_config
Can't export ConfigVal directly: https://github.com/PyO3/pyo3/issues/417
src/python.rs:14
↓ 1 callers
Function
error_anywhere
checks for tree-sitter `error` and `missing` values
src/extractor.rs:275
↓ 1 callers
Function
extract_from
extract refs sources and configs from the typed ast. there is no error in the return type because we have caught them all at this point that invariant
src/extractor.rs:673
↓ 1 callers
Function
kwargs_last
(args: &[ExprU])
src/extractor.rs:401
↓ 1 callers
Function
pythonize
Transation between rust extraction type and Python dictionary
src/python.rs:40
↓ 1 callers
Function
to_py_result
Naively converts a Result to a PyResult by using the string representation of the Rust exception as the message for ExtractionError.
src/python.rs:76
↓ 1 callers
Function
type_check_configs
for now, configs are constrained to a subset of types. This function checks for those types specifically returning a type that maintains that invarian
src/extractor.rs:418
Method
arbitrary
(g: &mut Gen)
src/extractor.rs:22
Function
bad_source_keyword_args
()
src/extractor.rs:868
Function
buried_refs_ast
()
src/extractor.rs:985
Function
config_ast
()
src/extractor.rs:1011
Function
config_excluded_kwargs
()
src/extractor.rs:924
Function
config_fails_non_kwarg_inputs
()
src/extractor.rs:849
Function
dbt_extractor
(py: Python, m: &Bound<'_, PyModule>)
src/python.rs:91
Method
default
()
src/extractor.rs:75
Function
exception_messages_render_as_expected
()
src/exceptions.rs:80
Function
expected_arity
expected_arity(vec![1,4,3,2]) == "1 to 4" expected_arity(vec![1,4]) == "1 to 4" expected_arity(vec![3]) == "3" expected_arity(vec![]) == "any"
src/exceptions.rs:58
Function
extractor_associativity
(x: Extraction, y: Extraction, z: Extraction)
src/extractor.rs:740
Function
extractor_left_and_right_identity
(x: Extraction)
src/extractor.rs:734
Function
extracts_all
()
tests/integration_tests.rs:85
Function
extracts_configs
()
tests/integration_tests.rs:60
Function
extracts_from_deepyly_nested_config
()
tests/integration_tests.rs:114
Function
extracts_multi_key_config
()
tests/integration_tests.rs:146
Function
extracts_multiple_distinct_config_blocks
()
tests/integration_tests.rs:161
Function
extracts_multiple_overlapping_config_blocks
()
tests/integration_tests.rs:176
Function
extracts_refs
()
tests/integration_tests.rs:16
Function
extracts_sources
()
tests/integration_tests.rs:70
Function
fails_on_open_jinja_brackets
()
src/extractor.rs:968
Function
fails_on_other_fn_names
()
src/extractor.rs:828
Method
from
(expr: &ExprU)
src/extractor.rs:250
Function
jinja_expression_ast
()
src/extractor.rs:1038
Function
jinja_expressions_fail_everywhere
()
src/extractor.rs:934
Function
kwarg_order
()
src/extractor.rs:1046
Function
main
This is a stub main. This will eventually run the extractor over real dbt projects in order to detect false positives and misses.
src/main.rs:7
Function
multi_block_with_jinja_expression_rejected
()
src/extractor.rs:949
Function
nested_fn_calls_fail
()
src/extractor.rs:914
Method
populate
( refs: Option<Vec<DbtRef>>, sources: Option<Vec<(String, String)>>, configs: Option<V
src/extractor.rs:61
Function
py_extract_from_source
(source: &str)
src/python.rs:86
Function
recognizes_multiple_jinja_calls
()
src/extractor.rs:819
Function
recognizes_ref_source_config
()
src/extractor.rs:809
Function
ref_accepts_one_and_two_strings
()
src/extractor.rs:897
Function
ref_ast
()
src/extractor.rs:973
Function
ref_bad_inputs_fail
()
src/extractor.rs:902
Method
shrink
(&self)
src/extractor.rs:30
Function
source_args_must_be_strings
()
src/extractor.rs:887
Function
source_ast
()
src/extractor.rs:1030
Function
source_keyword_args
()
src/extractor.rs:859
Function
source_must_have_2_args
()
src/extractor.rs:877
Function
test_config_all_inputs
()
src/extractor.rs:837
Function
test_expected_arity
if you change this test, change the comments on the function to match
src/exceptions.rs:154
Function
top_level_kwargs_are_rejected
()
src/extractor.rs:944