{"id":16985856,"url":"https://github.com/as400jplpc/mariacpp","last_synced_at":"2026-04-13T07:03:28.870Z","repository":{"id":174038226,"uuid":"137306659","full_name":"AS400JPLPC/MariaCpp","owner":"AS400JPLPC","description":"  Forked from Roslaniec/MariaCpp  C++ connector library for MariaDB revisited not mysql ","archived":false,"fork":false,"pushed_at":"2018-06-14T14:05:50.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T19:51:07.463Z","etag":null,"topics":["wrapper"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AS400JPLPC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-06-14T04:37:39.000Z","updated_at":"2018-06-14T14:05:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d008db9-1a54-44e7-a6fd-30714faa230a","html_url":"https://github.com/AS400JPLPC/MariaCpp","commit_stats":null,"previous_names":["as400jplpc/mariacpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2FMariaCpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2FMariaCpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2FMariaCpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AS400JPLPC%2FMariaCpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AS400JPLPC","download_url":"https://codeload.github.com/AS400JPLPC/MariaCpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244894309,"owners_count":20527669,"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":["wrapper"],"created_at":"2024-10-14T02:44:18.338Z","updated_at":"2026-04-13T07:03:28.795Z","avatar_url":"https://github.com/AS400JPLPC.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"io\u003c!-- -*- mode: markdown -*-  --\u003e\nhttp://mariacpp.roslaniec.net/     Thank You\n\nMariaCpp is C++ library that lets you connect to the MariaDB Server  10.2.9\nMariaDB Connector for/C  3.0.3  \nLINUX not tested Windows\n\nMajor features of MariaCpp\n--------------------------\n\n*   __LGPL__ (with static link exception) license\n\n*   thin C++ wrapper around _MariaDB Connector/C_ (C-API);\n    _thin_ means that C++ objects have none (or minimal) internal state,\n    and you can possibly mix C++ code with native C-API\n\n*   works with, C++11, C++14 standards\n\n*   it takes benefits of 2 major C++ paradigms: __RAII__ and __exceptions__\n\n*   supports most C-API features, including __prepared statements__\n\n*   supports __multithreading__ (multiple connections to DB)\n\n*   no other dependencies (e.g. no Boost dependency)\n\n\n\nExample\n-------\n\n\n```C++\n#include \u003cmariacpp/lib.hpp\u003e\n#include \u003cmariacpp/connection.hpp\u003e\n#include \u003cmariacpp/exception.hpp\u003e\n#include \u003cmariacpp/prepared_stmt.hpp\u003e\n#include \u003cmariacpp/time.hpp\u003e\n#include \u003cmariacpp/uri.hpp\u003e\n#include \u003ccstdlib\u003e\n#include \u003ciostream\u003e\n#include \u003cmemory\u003e\n\nusing namespace MariaCpp;\n\nconst char *uri = \"tcp://localhost:3306/test\";\nconst char *user = \"test\";\nconst char *passwd = \"\";\n\nint main()\n{\n    scoped_library_init maria_lib_init;\n\n    try {\n        Connection conn;\n        conn.connect(Uri(uri), user, passwd);\n\n        conn.query(\"CREATE TEMPORARY TABLE test \"\n                    \"(i INT, s CHAR(15), d DATETIME)\");\n        std::auto_ptr\u003cPreparedStatement\u003e stmt(\n            conn.prepare(\"INSERT INTO test (i,s,d) values(?,?,?)\"));\n\n        assert(3 == stmt-\u003eparam_count());\n        stmt-\u003esetInt(0, 1);\n        stmt-\u003esetString(1, \"string-1\");\n        stmt-\u003esetDateTime(2, Time(\"2016-03-23 02:41\"));\n        stmt-\u003eexecute();\n\n        stmt-\u003esetInt(0, 2);\n        stmt-\u003esetNull(1);\n        stmt-\u003esetDateTime(2, Time::datetime(2015, 02, 21, 12, 45, 51));\n        stmt-\u003eexecute();\n\n        stmt.reset(conn.prepare(\"SELECT i, s, d FROM test ORDER BY i\"));\n        stmt-\u003eexecute();\n        while (stmt-\u003efetch()) {\n            std::cout \u003c\u003c \"i = \" \u003c\u003c stmt-\u003egetInt(0);\n            std::cout \u003c\u003c \", s = \";\n            if (stmt-\u003eisNull(1)) std::cout \u003c\u003c \"NULL\";\n            else std::cout \u003c\u003c stmt-\u003egetString(1);\n            std::cout \u003c\u003c \", d = \" \u003c\u003c stmt-\u003egetTime(2) ;\n            std::cout \u003c\u003c std::endl;\n        }\n        conn.close();\n    } catch (Exception \u0026e) {\n        std::cerr \u003c\u003c e \u003c\u003c std::endl;\n        return 1;\n    }\n    return 0;\n}\n```\n\n    i = 1, s = string-1, d = 2016-03-23 02:41:00\n    i = 2, s = NULL, d = 2015-02-21 12:45:51\n\nFAQ\n---\n\nsources have been modified for compilation and add function...  \nregard .... connection.hpp  { set_session start_transaction savepoint rollbackto release }\nbind.cpp  lib.cpp   prepared_stmt.cpp\n\nthis is not valid for Mysql because compile and scheduled for MariaDB and test as well.\nif not go back to the original site.\n\nI thank for the work done by the author\n\n\nar: création de bin/libmariacpp.a\nOutput file is bin/libmariacpp.a with size 121,70 KB test compile only lib C++11 ;)\n\n* * *\n\n**Q**: Why _MariaCpp_ is licensed as LGPL?\n\n**A**: MariaCpp is licensed in the same spirit as _MariaDB Connector/C_.\n\n* * *\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas400jplpc%2Fmariacpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fas400jplpc%2Fmariacpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fas400jplpc%2Fmariacpp/lists"}