viaduck / Mariadbpp
Licence: bsl-1.0
C++ client library for MariaDB.
Stars: ✭ 76
Programming Languages
cpp
1120 projects
Projects that are alternatives of or similar to Mariadbpp
Jet
Type safe SQL builder with code generation and automatic query result data mapping
Stars: ✭ 373 (+390.79%)
Mutual labels: database, mariadb
Typeorm
ORM for TypeScript and JavaScript (ES7, ES6, ES5). Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
Stars: ✭ 26,559 (+34846.05%)
Mutual labels: database, mariadb
Evolve
Database migration tool for .NET and .NET Core projects. Inspired by Flyway.
Stars: ✭ 477 (+527.63%)
Mutual labels: database, mariadb
Bitnami Docker Mariadb
Bitnami MariaDB Docker Image
Stars: ✭ 251 (+230.26%)
Mutual labels: database, mariadb
Denodb
MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Stars: ✭ 498 (+555.26%)
Mutual labels: database, mariadb
Migrate
Database migrations. CLI and Golang library.
Stars: ✭ 7,712 (+10047.37%)
Mutual labels: database, mariadb
Migrate
Database migrations. CLI and Golang library.
Stars: ✭ 2,315 (+2946.05%)
Mutual labels: database, mariadb
Mysqldump Php
PHP version of mysqldump cli that comes with MySQL
Stars: ✭ 975 (+1182.89%)
Mutual labels: database, mariadb
Ocaml Caqti
Cooperative-threaded access to relational data
Stars: ✭ 175 (+130.26%)
Mutual labels: database, mariadb
Phpmyfaq
phpMyFAQ - Open Source FAQ web application for PHP and MySQL, PostgreSQL and other databases
Stars: ✭ 494 (+550%)
Mutual labels: database, mariadb
Mysql
Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package
Stars: ✭ 11,735 (+15340.79%)
Mutual labels: database, mariadb
Pomelo.entityframeworkcore.mysql
Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector
Stars: ✭ 2,099 (+2661.84%)
Mutual labels: database, mariadb
Mariadb Container
MariaDB container images based on Red Hat Software Collections and intended for OpenShift and general usage. Users can choose between Red Hat Enterprise Linux, Fedora, and CentOS based images.
Stars: ✭ 19 (-75%)
Mutual labels: database, mariadb
mariadb++
C++ client library for MariaDB. Uses the C connector.
Features
- Prepared statements
- Transactions and savepoints
- Concurrency allows connection sharing between threads
- Data type support: blob, decimal, datetime, time, timespan, etc.
- Exceptions
Dependencies
Install mariadbclient
or mysqlclient
libraries.
Usage (local)
- Initialize Git submodules:
git submodule update --init
- Add
mariadbclientpp
as a subdirectory in your ownCMakeLists.txt
:
add_subdirectory(/path/to/mariadbpp)
...
target_link_libraries(target mariadbclientpp)
Usage (global)
Build and install instructions
- Initialize Git submodules:
git submodule update --init
mkdir build; cd build
cmake ..
make install
Linking instructions
Add mariadbclientpp
as a CMake package to your CMake project. Make sure
that the environment variable CMAKE_PREFIX_PATH
includes the directory
where the mariadbclientpp-config.cmake
file was installed:
find_package(mariadbclientpp)
...
target_link_libraries(target mariadbclientpp::mariadbclientpp)
Building tests
- Create database and user according to the information in test/CMakeLists.txt or adjust these values.
- Enable tests with
-DMARIADBPP_TEST=ON
and build the software.
Example
// set up the account
account_ref acc = account::create(...);
// create connection
connection_ref con = connection::create(acc);
// insert, update, select on the connection
u64 id = con->insert("INSERT INTO table VALUES (1, 2, 3)");
u64 affected = con->execute("UPDATE table SET a=1");
result_set_ref result = con->query("SELECT * FROM table");
// create statement
statement_ref stmt = con->create_statement(...);
// insert, update, select on the statement
u64 id = stmt->insert();
u64 affected = stmt->execute();
result_set_ref result = stmt->query();
// reading from a result set
while (result->next()) {
int a = result->get_unsigned32(0);
int b = result->get_unsigned32("b");
}
// insert using prepared statement
statement_ref stmt = con->create_statement("INSERT INTO table (?, ?, ?)");
stmt->set_unsigned32(0, 13);
stmt->set_unsigned32(1, 37);
stmt->set_unsigned32(2, 42);
stmt->insert();
More usage examples can be found in the test/
directory.
History
This library was originally developed on Launchpad. It has since been forked and is now being actively maintained here.
License
This library is subject to the Boost Software License. See accompanying LICENSE file.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].