MCPcopy Create free account
hub / github.com/JasonShin/sqlx-ts / process_default_decl

Function process_default_decl

src/parser/decl.rs:69–89  ·  view source on GitHub ↗
(sqls: &mut Vec<SQL>, default_decl: &DefaultDecl, import_alias: &String)

Source from the content-addressed store, hash-verified

67}
68
69pub fn process_default_decl(sqls: &mut Vec<SQL>, default_decl: &DefaultDecl, import_alias: &String) -> Result<()> {
70 match default_decl {
71 DefaultDecl::Class(class) => {
72 let class_body = &class.class.body;
73 for body_stmt in class_body {
74 process_class_member(sqls, body_stmt, import_alias)?;
75 }
76 }
77 DefaultDecl::Fn(func) => {
78 let body = &func.function.body;
79
80 if let Some(body) = body {
81 for stmt in &body.stmts {
82 recurse_and_find_sql(sqls, stmt, import_alias)?;
83 }
84 }
85 }
86 DefaultDecl::TsInterfaceDecl(_) => {}
87 }
88 Ok(())
89}
90
91pub fn process_class_decl(sqls: &mut Vec<SQL>, class: &ClassDecl, import_alias: &String) -> Result<()> {
92 let class_body = &class.class.body;

Callers 1

parse_js_fileFunction · 0.85

Calls 2

process_class_memberFunction · 0.85
recurse_and_find_sqlFunction · 0.85

Tested by

no test coverage detected