{"id":20162902,"url":"https://github.com/actiontech/java-sql-extractor","last_synced_at":"2025-04-10T00:36:31.831Z","repository":{"id":202570804,"uuid":"706478944","full_name":"actiontech/java-sql-extractor","owner":"actiontech","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-20T02:42:32.000Z","size":152,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T02:22:17.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actiontech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-18T03:14:07.000Z","updated_at":"2023-11-20T02:42:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"27b826de-5d19-4d80-9812-28dcdca396d2","html_url":"https://github.com/actiontech/java-sql-extractor","commit_stats":null,"previous_names":["actiontech/java-sql-extractor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actiontech%2Fjava-sql-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actiontech%2Fjava-sql-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actiontech%2Fjava-sql-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actiontech%2Fjava-sql-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actiontech","download_url":"https://codeload.github.com/actiontech/java-sql-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137996,"owners_count":21053773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T00:27:20.175Z","updated_at":"2025-04-10T00:36:31.813Z","avatar_url":"https://github.com/actiontech.png","language":"Go","readme":"## 使用方法\n```golang\n\n// 传递文件进行解析\np, err := parser.CreateJavaParser(\"/root/javaexample/test/Test7.java\")\nif err != nil {\n    os.Exit(-1)\n}\n\n// 生成java解析器的访问者\nv := parser.NewJavaVisitor()\n\n// 从跟节点开始访问，并生成自定义的变量树\na:=p.CompilationUnit()\na.Accept(v)\n\n// 从变量树中根据jdbc运行sql的函数获取sql\nfmt.Println(parser.GetSqlsFromVisitor(v))\n\n/*\ndelete from t1;\nselect BYTES from user_segments where segment_name =?\n*/\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factiontech%2Fjava-sql-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factiontech%2Fjava-sql-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factiontech%2Fjava-sql-extractor/lists"}