{"id":20474202,"url":"https://github.com/marschall/stored-procedure-proxy","last_synced_at":"2025-08-29T05:06:59.610Z","repository":{"id":43847566,"uuid":"64686172","full_name":"marschall/stored-procedure-proxy","owner":"marschall","description":"A more convenient and type safe way to call stored procedures from Java.","archived":false,"fork":false,"pushed_at":"2023-11-20T23:32:23.000Z","size":538,"stargazers_count":24,"open_issues_count":13,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-19T16:28:49.422Z","etag":null,"topics":["java","jdbc","stored-procedures"],"latest_commit_sha":null,"homepage":"","language":"Java","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/marschall.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,"zenodo":null}},"created_at":"2016-08-01T17:09:24.000Z","updated_at":"2024-10-30T13:46:07.000Z","dependencies_parsed_at":"2024-11-15T14:30:57.190Z","dependency_job_id":"ba3966b0-4c51-4d29-81bf-95e9f05f99cc","html_url":"https://github.com/marschall/stored-procedure-proxy","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/marschall/stored-procedure-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fstored-procedure-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fstored-procedure-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fstored-procedure-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fstored-procedure-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marschall","download_url":"https://codeload.github.com/marschall/stored-procedure-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marschall%2Fstored-procedure-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272631671,"owners_count":24967110,"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-08-29T02:00:10.610Z","response_time":87,"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":["java","jdbc","stored-procedures"],"created_at":"2024-11-15T14:28:34.573Z","updated_at":"2025-08-29T05:06:59.585Z","avatar_url":"https://github.com/marschall.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Stored Procedure Proxy [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/stored-procedure-proxy/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.marschall/stored-procedure-proxy) [![Javadocs](http://www.javadoc.io/badge/com.github.marschall/stored-procedure-proxy.svg)](http://www.javadoc.io/doc/com.github.marschall/stored-procedure-proxy) [![Build Status](https://app.travis-ci.com/marschall/stored-procedure-proxy.svg?branch=master)](https://app.travis-ci.com/marschall/stored-procedure-proxy) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://opensource.org/licenses/MIT)\n======================\n\nA more convenient and type safe way to call stored procedures from Java.\n\nThis project allows you to define a Java interface method for every stored procedure you want to call. Then it creates a dynamic instance of that interface that calls the stored procedure whenever you call the method.\n\nSimply create an interface that represents the stored procedures you want to call.\n\n```java\npublic interface TaxProcedures {\n\n  BigDecimal salesTax(BigDecimal subtotal);\n\n}\n\n```\n\nThen create an instance using only a `javax.sql.DataSource`\n\n```java\nTaxProcedures taxProcedures = ProcedureCallerFactory.build(TaxProcedures.class, dataSource);\n\n```\n\nInvoking interface methods will then call stored procedure.\n\n```java\ntaxProcedures.salesTax(new BigDecimal(\"100.00\"));\n```\n\nwill actually call the stored procedure.\n\n\nCheck out the [wiki](https://github.com/marschall/stored-procedure-proxy/wiki) for more information.\n\nThe project has no runtime dependencies and is a single JAR weighting 100 kB.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.marschall\u003c/groupId\u003e\n  \u003cartifactId\u003estored-procedure-proxy\u003c/artifactId\u003e\n  \u003cversion\u003e0.12.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\nWhat problem does this project solve?\n-------------------------------------\n\nCalling simple stored procedures in JDBC or JPA is unnecessarily [cumbersome](https://blog.jooq.org/2016/06/08/using-stored-procedures-with-jpa-jdbc-meh-just-use-jooq/) and not type safe. While this may be required in rare cases in common cases this can be solved much easier. None of the common data access layers solve this issue:\n\n- While [spring-jdbc](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/jdbc.html) offers many ways to call a stored procedure all of them require the registration of [SqlParameter](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/SqlParameter.html) objects. The options are:\n  - call [JdbcOperations#call](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/JdbcOperations.html#call-org.springframework.jdbc.core.CallableStatementCreator-java.util.List-)\n  - sublcass [StoredProcedure](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/object/StoredProcedure.html)\n  - use [GenericStoredProcedure](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/object/GenericStoredProcedure.html)\n  - use [SimpleJdbcCall](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html), accesses database metadata by default. Metadata access has to be [disabled](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html#withoutProcedureColumnMetaDataAccess--) for every use\n- [Spring Data JPA](https://github.com/spring-projects/spring-data-examples/tree/master/jpa/jpa21) offers two ways\n  - the first is hardly an improvement since it still needs a `@NamedStoredProcedureQuery`\n  - the [second](https://jira.spring.io/browse/DATAJPA-455) is quite nice, we take inspiration from this approach and add more flexibility\n- [jOOQ](https://www.jooq.org/doc/3.10/manual/sql-execution/stored-procedures/) offers stored procedure support in a way that is similar to this project, in addition it supports many more features and can generate classes from a database schema. The only down sides are that it requires passing a configuration object ([for now](https://github.com/jOOQ/jOOQ/issues/5677)) and Oracle support is commercial.\n- [jDBI](https://github.com/jdbi/jdbi/issues/135) falls back to manual parameter registration for out parameters as well.\n- [Ebean](https://ebean-orm.github.io/apidocs/com/avaje/ebean/CallableSql.html) falls back to manual parameter registration for out parameters as well.\n- [Querydsl](https://github.com/querydsl/querydsl/issues/15) has no support at all\n- [Sql2o](https://groups.google.com/forum/#!topic/sql2o/4Fdh5VjZ-uk) seems to have no support at all\n- [spwrap](https://github.com/mhewedy/spwrap) is similar in spirit but requires more annotations and is currently a bit less flexible\n\nWhile they all have their use case none of them fitted our needs.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fstored-procedure-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarschall%2Fstored-procedure-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarschall%2Fstored-procedure-proxy/lists"}