{"id":16521334,"url":"https://github.com/mikebionic/db-gateway-go","last_synced_at":"2025-12-15T04:35:09.093Z","repository":{"id":79220135,"uuid":"387422293","full_name":"mikebionic/db-gateway-go","owner":"mikebionic","description":"db gateway server on Golang api","archived":false,"fork":false,"pushed_at":"2024-08-19T06:20:20.000Z","size":29,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T16:54:56.638Z","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/mikebionic.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}},"created_at":"2021-07-19T10:16:18.000Z","updated_at":"2024-08-19T06:20:24.000Z","dependencies_parsed_at":"2023-03-08T03:30:22.854Z","dependency_job_id":null,"html_url":"https://github.com/mikebionic/db-gateway-go","commit_stats":null,"previous_names":["mikebionic/db-gateway-go"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fdb-gateway-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fdb-gateway-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fdb-gateway-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikebionic%2Fdb-gateway-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikebionic","download_url":"https://codeload.github.com/mikebionic/db-gateway-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221813411,"owners_count":16884823,"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-10-11T16:55:14.158Z","updated_at":"2025-12-15T04:35:09.004Z","avatar_url":"https://github.com/mikebionic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Database gateway API\n\nA lightweight and deployment-friendly API gateway for making direct SQL queries to PostgreSQL and MSSQL databases. Designed for fast prototyping and data exchange, it simplifies API creation for database-driven applications without complex backend logic.\nKey Features:\n\n    📡 Instant API – Generate database-backed APIs in minutes.\n    ⚡ Fast \u0026 Simple – Execute SQL queries with minimal setup.\n    🔄 JSON Responses – Returns structured, consistent JSON outputs.\n    🔗 Multi-Platform Use – Ideal for web, mobile, and desktop apps.\n    🛠 Perfect for Prototyping – Quickly test database interactions without a full backend.\n\nWhether you're building an MVP, testing data integrations, or need a simple interface for accessing your database, Database Gateway API delivers a hassle-free solution! 🚀\n\nAPI for making direct sql requests to a MSSQL or Postgresql dataabses\nIt used to make an API for PostgreSQL or MSSQL databases for fast deploying simple db-related API's for checking the data (like firebase)\nBeing silly and easy it provides fast queries to database and correct json responses, and it's still used for simple prototyping and data exchange for easy and on-testing web, mobile, desktop apps.\n\n\n\u003e Request for Select query\n\n| url                                   | method |\n| ------------------------------------- | :----: |\n| 127.0.0.1:8000/api/v1/make-db-request |  POST  |\n\n```json\n{\n\t\"query_string\": \"select * from tbl_mg_materials\",\n  \"base64_columns\": [ \"group_code\", \"image_pict\", \"firm_id_guid\"]\n\t//\"query_string\": \"select \\\"ResName\\\" from tbl_dk_resource\",\n}\n```\n\n\u003e **base64_columns** - are the ones you prefer to be encoded in base64. You need it mostly in image BLOB\n\n**Response**\n```json\n{\n  \"data\": [\n    {\n      \"T_ID\": 1,\n      \"a_status_id\": 1,\n      \"acc_card_cost_of_sale_id\": 108,\n      \"acc_card_inventory_id\": 237,\n      \"acc_card_purches_disc_id\": 0,\n      \"acc_card_purches_id\": 0,\n      \"acc_card_purches_ret_id\": 0,\n      \"acc_card_sale_disc_id\": 36,\n      \"acc_card_sale_id\": 34,\n      \"acc_card_sale_ret_id\": 35,\n      \"acc_card_scrap_id\": 64,\n      \"acc_card_usage_id\": 64,\n      \"data_send\": 0,\n      \"dept_id\": 1,\n      \"div_id\": 1,\n      \"firm_id\": 1,\n      \"firm_id_guid\": \"CAB9C297-C332-4BF1-AD3B-A27154BEEC7C\",\n      \"group_code\": \"SALAT\",\n      \"m_cat_id\": 14,\n      \"mat_auto_price\": \"0.00000\",\n      \"mat_auto_production\": 0,\n      \"mat_brand_code\": \"\",\n      \"mat_height\": \"0.00000\",\n      \"mat_last_purch_arap_id\": 0,\n      \"mat_length\": \"0.00000\",\n      \"mat_manufacturer\": null,\n      \"mat_name_lang1\": \"WINIGRET \",\n      \"mat_name_lang2\": \"\",\n      \"mat_name_lang3\": \"\",\n      \"mat_name_lang4\": \"\",\n      \"mat_name_lang5\": \"\",\n      \"mat_online_isvisible\": null,\n      \"mat_real_price\": \"0.00000\",\n      \"mat_shop_code\": \"\",\n      \"mat_size_code\": \"\",\n      \"mat_weight\": \"0.00000\",\n      \"mat_width\": \"0.00000\",\n      \"material_code\": \"AN00000049\",\n      \"material_description\": \"\",\n      \"material_description1\": \"\",\n      \"material_id\": 49,\n      \"material_id_guid\": \"d0d43809-d242-43b0-acf7-0e4812bb2e94\",\n      \"material_name\": \"WINIGRET \",\n      \"modify_date\": \"2021-03-18T16:00:33.523Z\",\n      \"security_code\": \"KUHNYA\",\n      \"spe_code\": \"\",\n      \"spe_code1\": \"\",\n      \"spe_code10\": \"\",\n      \"spe_code11\": \"\",\n      \"spe_code12\": \"\",\n      \"spe_code13\": null,\n      \"spe_code14\": null,\n      \"spe_code15\": null,\n      \"spe_code2\": \"\",\n      \"spe_code3\": \"\",\n      \"spe_code4\": \"\",\n      \"spe_code5\": \"\",\n      \"spe_code6\": \"\",\n      \"spe_code7\": \"\",\n      \"spe_code8\": \"\",\n      \"spe_code9\": \"\",\n      \"sync_datetime\": null,\n      \"unit_det_id\": 1,\n      \"unit_id\": 1\n    },\n    {\n      \"T_ID\": 1,\n      \"a_status_id\": 1,\n      \"acc_card_cost_of_sale_id\": 108,\n      \"acc_card_inventory_id\": 237,\n      \"acc_card_purches_disc_id\": 0,\n      \"acc_card_purches_id\": 0,\n      \"acc_card_purches_ret_id\": 0,\n      \"acc_card_sale_disc_id\": 36,\n      \"acc_card_sale_id\": 34,\n      \"acc_card_sale_ret_id\": 35,\n      \"acc_card_scrap_id\": 64,\n      \"acc_card_usage_id\": 64,\n      \"data_send\": 0,\n      \"dept_id\": 1,\n      \"div_id\": 1,\n      \"firm_id\": 1,\n      \"firm_id_guid\": \"CAB9C297-C332-4BF1-AD3B-A27154BEEC7C\",\n      \"group_code\": \"SALAT\",\n      \"m_cat_id\": 14,\n      \"mat_auto_price\": \"0.00000\",\n      \"mat_auto_production\": 0,\n      \"mat_brand_code\": \"\",\n      \"mat_height\": \"0.00000\",\n      \"mat_last_purch_arap_id\": 0,\n      \"mat_length\": \"0.00000\",\n      \"mat_manufacturer\": null,\n      \"mat_name_lang1\": \"OLWIYE \",\n      \"mat_name_lang2\": \"\",\n      \"mat_name_lang3\": \"\",\n      \"mat_name_lang4\": \"\",\n      \"mat_name_lang5\": \"\",\n      \"mat_online_isvisible\": null,\n      \"mat_real_price\": \"0.00000\",\n      \"mat_shop_code\": \"\",\n      \"mat_size_code\": \"\",\n      \"mat_weight\": \"0.00000\",\n      \"mat_width\": \"0.00000\",\n      \"material_code\": \"AN00000050\",\n      \"material_description\": \"\",\n      \"material_description1\": \"\",\n      \"material_id\": 50,\n      \"material_id_guid\": \"CCC697DF-142B-449F-BF40-59C22C02E4CC\",\n      \"material_name\": \"OLWIYE \",\n      \"modify_date\": \"2021-03-18T16:00:33.523Z\",\n      \"security_code\": \"KUHNYA\",\n      \"spe_code\": \"\",\n      \"spe_code1\": \"\",\n      \"spe_code10\": \"\",\n      \"spe_code11\": \"\",\n      \"spe_code12\": \"\",\n      \"spe_code13\": null,\n      \"spe_code14\": null,\n      \"spe_code15\": null,\n      \"spe_code2\": \"\",\n      \"spe_code3\": \"\",\n      \"spe_code4\": \"\",\n      \"spe_code5\": \"\",\n      \"spe_code6\": \"\",\n      \"spe_code7\": \"\",\n      \"spe_code8\": \"\",\n      \"spe_code9\": \"\",\n      \"sync_datetime\": null,\n      \"unit_det_id\": 1,\n      \"unit_id\": 1\n    }\n  ],\n  \"status\": 1,\n  \"total\": 2,\n  \"message\": \"db query result\"\n}\n```\n\n\n\u003e Request for Update | Insert | Delete query\n\n| url                                                 | method |\n| --------------------------------------------------- | :----: |\n| 127.0.0.1:8000/api/v1/make-db-request?executeOnly=1 |  POST  |\n\n```json\n{\n\t\"query_string\": \"update tbl_dk_users set \\\"URegNo\\\" = 'SSFK123' where \\\"UId\\\" = 1\"\n}\n```\n\u003e Response\n\n```json\n{\n  \"data\": null,\n  \"status\": 1,\n  \"total\": 1,\n  \"message\": \"db query result\"\n}\n```\n\n!! Use **executeOnly** to make other than **SELECT** queries\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fdb-gateway-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikebionic%2Fdb-gateway-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikebionic%2Fdb-gateway-go/lists"}