{"id":16122055,"url":"https://github.com/foxcapades/java-sql-import","last_synced_at":"2026-02-24T03:31:23.649Z","repository":{"id":90411101,"uuid":"65590371","full_name":"Foxcapades/java-sql-import","owner":"Foxcapades","description":"SQL resource loading \u0026 caching","archived":false,"fork":false,"pushed_at":"2018-06-18T13:36:37.000Z","size":110,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-16T09:36:09.521Z","etag":null,"topics":["files","java-10","sql"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Foxcapades.png","metadata":{"files":{"readme":"readme.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-08-13T00:07:20.000Z","updated_at":"2021-03-04T17:17:44.000Z","dependencies_parsed_at":"2023-05-04T01:24:46.505Z","dependency_job_id":null,"html_url":"https://github.com/Foxcapades/java-sql-import","commit_stats":{"total_commits":32,"total_committers":3,"mean_commits":"10.666666666666666","dds":0.375,"last_synced_commit":"1fb468dc1e3692977639592e1be663003dd60eae"},"previous_names":["vulpine-io/lib-sql"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Foxcapades/java-sql-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fjava-sql-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fjava-sql-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fjava-sql-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fjava-sql-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Foxcapades","download_url":"https://codeload.github.com/Foxcapades/java-sql-import/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2Fjava-sql-import/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281323685,"owners_count":26481557,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["files","java-10","sql"],"created_at":"2024-10-09T21:09:15.501Z","updated_at":"2025-10-27T18:44:31.603Z","avatar_url":"https://github.com/Foxcapades.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= sql-import\n:jdk-path: https://docs.oracle.com/javase/10/docs/api\n\nimage:https://img.shields.io/maven-central/v/io.vulpine.lib/sql-import.svg?maxAge=14400[link=http://search.maven.org/#artifactdetails|io.vulpine.lib|sql-import]\nimage:https://api.codacy.com/project/badge/Grade/5feaaf04c0024aa78b194921723b25ad[\"Codacy code quality\", link=\"https://www.codacy.com/app/Foxcapades/java-sql-import?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=Foxcapades/java-sql-import\u0026utm_campaign=Badge_Grade\"]\nimage:https://img.shields.io/github/license/foxcapades/java-sql-import.svg?maxAge=2592000?style=plastic[License]\nimage:https://img.shields.io/badge/Java-18.3-red.svg[Java Version, title=\"Java Version\", link={jdk-path}]\n\nSQL resource loading \u0026 caching.\n\nReads from a configurable standardized directory layout organized by query type.\n\nQueries are cached per SqlLoader instance so repeated loads of the same query\nwill only incur the filesystem I/O cost once.\n\nImport functions utilize the\n{jdk-path}/java/util/Optional.html[`java.util.Optional`] type.  In the event\nthat a query does not exist or cannot be loaded, an empty `Optional` will be\nreturned, otherwise the `Optional` will contain the SQL text loaded from the\nspecified file.\n\n== Examples\n\n.Resource directory using default settings\n[source]\n----\n/resource-dir (src/main/resources for Gradle projects)\n  └─ /sql\n      ├─ /delete\n      │   ├─ /comments\n      │   │   ├─ by-id.sql\n      │   │   └─ by-user.sql\n      │   └─ /users\n      │       └─ by-id.sql\n      ├─ /insert\n      │   ├─ /comment.sql\n      │   └─ /user.sql\n      ├─ /select\n      (etc...)\n----\n\nUsing the example above loading queries could be accomplished by the following:\n\n.Example.java\n[source, java]\n----\npublic void example() {\n  var loader      = new SqlLoader(); // \u003c1\u003e\n  var delComments = loader.delete(\"comments.by-user\"); // \u003c2\u003e\n  var delUsers    = loader.delete(\"users/by-id\"); // \u003c3\u003e\n  var insUser     = loader.insert(\"user\");\n}\n----\n\u003c1\u003e Defaulted SqlLoader instance\n\u003c2\u003e Import using dot notation\n\u003c3\u003e Import using path notation","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fjava-sql-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcapades%2Fjava-sql-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fjava-sql-import/lists"}