-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e21d229
commit 40e7aaf
Showing
7 changed files
with
132 additions
and
92 deletions.
There are no files selected for viewing
Submodule boost
updated
5 files
+1 −1 | libs/exception | |
+1 −1 | libs/function | |
+1 −1 | libs/leaf | |
+1 −1 | libs/type_traits | |
+1 −1 | tools/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,51 @@ | ||
# MySQL Module to Godot 4. | ||
|
||
# MySQL Module to Godot 4 | ||
|
||
### This module was built using Boost.MySQL. | ||
**Check out the Boost repository:** [**Boost.MySQL**](https://github.com/boostorg/mysql?tab=readme-ov-file) | ||
### **This module is a wrapper for Boost.MySQL.** | ||
|
||
### This module works only with Godot 4. | ||
### If you use this module, let me know it. Leave a star. | ||
Boost.MySQL is a client for MySQL and MariaDB database servers, based on Boost.Asio. | ||
Boost.MySQL is part of Boost. | ||
This module takes advantage of C++20. | ||
Check out the Boost repository: [Boost.MySQL](https://github.com/boostorg/mysql?tab=readme-ov-file). | ||
|
||
### Old version note: | ||
Version 2.0 uses C++ MySQL Connector Library. You can find it here: [**Godot MySQL 2.0**](https://github.com/Malkverbena/mysql/tree/2.0) | ||
|
||
## Features: | ||
- Supports TCP and UNIX SOCKET connections. | ||
- Supports TLS | ||
- Supports asynchronous queries. | ||
- Supports multi queries. | ||
|
||
##### This module works only with Godot 4. | ||
|
||
## Supported platforms: (Under development). | ||
* MacOS - soon (need help). | ||
* X11/Unix - dev. | ||
* Windows - dev. | ||
* javascript - need help. | ||
* O̶S̶X̶ - possibly (need help). | ||
* A̶n̶d̶r̶o̶i̶d̶ - possibly. | ||
I have no plans to back port this module to Godot 3.x, but I will accept help from anyone who wants to port it. | ||
|
||
|
||
## Requirements: | ||
- A C++20 capable compiler as GCC, Clang (x11) , Visual C++ (Windows) or Apple Clang (Apple). | ||
- [**NASM - Only for Windows**](https://www.nasm.us/pub/nasm/releasebuilds/) | ||
- Git | ||
- All requirements to compile Godot. | ||
##### If you use this module, let me know it. Leave a star ;). | ||
|
||
##### Do you have any suggestion? Would you like to share experiences while using the module? Please open a issue. | ||
|
||
## Installation: | ||
##### Old version note: | ||
|
||
Clone this repository with the following command to checkout all the dependencies: Boost and OpenSSL. | ||
Version 1.0 uses C++ MySQL Connector Library from [Oracle](https://dev.mysql.com/doc/connector-cpp/8.3/en/). You can find it here: [Godot MySQL 2.0](https://github.com/Malkverbena/mysql/releases/tag/V2.0). | ||
|
||
``` | ||
$ git clone --recurse-submodules [email protected]:Malkverbena/mysql.git | ||
``` | ||
|
||
If you already checked out the branch use the following commands to update the dependencies: | ||
|
||
``` | ||
$ git submodule update --init --recursive | ||
``` | ||
## Supported platforms: (Work in progress). | ||
|
||
* MacOS - soon (need help). | ||
* X11/Unix - dev. | ||
* Windows - dev. | ||
* OSX- possibly (need help). | ||
* Android - In the future. | ||
* Web - need help. | ||
|
||
## Compilation: | ||
For now, it is necessary to compile the entire mechanism. | ||
### [See the full list of features here.](https://github.com/Malkverbena/mysql/blob/3.0/capabilities.md) | ||
|
||
In the future there will be a version for GDExtension. | ||
### [Compilation intruction here!](https://github.com/Malkverbena/mysql/blob/3.0/compilation.md) | ||
|
||
It is highly recommended to compile the engine with the "precision=double" option. | ||
|
||
Clone this repository inside the godot modules folder and compile the engine normally. | ||
## Usage: | ||
|
||
* **[Documentation.](https://github.com/Malkverbena/mysql/wiki)** | ||
* **[Check out some exemples here.](https://github.com/Malkverbena/mysql/wiki)** | ||
|
||
## Usage: | ||
**See the docs here** [**Docs**](https://github.com/Malkverbena/mysql/tree/Docs-%26-Exemples-3.0) | ||
|
||
|
||
# Disclaimer | ||
|
||
> THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,34 @@ | ||
## Capabilities: | ||
|
||
### Connection: | ||
- Set/Get Properties | ||
- SSL/TLS connections | ||
- Map of properties | ||
|
||
### Simple text queries: | ||
- Query | ||
- Execute | ||
- Update | ||
- Transactions & Save Points | ||
* TCP and UNIX socket connections. | ||
* Encrypted connections (TLS). For both, TCP and UNIX socket connections. | ||
* Authentication methods: mysql_native_password and caching_sha2_password. | ||
|
||
### Prepared Statement for: | ||
- Query | ||
- Execute | ||
- Update | ||
- Transactions & Save Points | ||
|
||
### **Methods:** | ||
|
||
### Supported Godot & SQL data types: | ||
|
||
TYPE | GODOT | SQL -> sql::DataType | ||
-------|------------|---------------------- | ||
|| | ||
NULL | null | NILL / res->isNull | ||
BOOL | bool | BIT | ||
INT32 | integer 32 | TINYINT / SMALLINT / MEDIUMINT | ||
INT64 | integer 64 | INTEGER / BIGINT | ||
FLOAT | float | REAL / DOUBLE / DECIMAL / NUMERIC | ||
TIME | Array | DATE / TIME / TIMESTAMP / YEAR | ||
CHAR | String | ENUM / CHAR / VARCHAR / LONGVARCHAR | ||
JSON | JsonString | JSON / TEXT | ||
BINARY | ByteArray | BINARY / VARBINARY / LONGVARBINARY | ||
|
||
* Supports asynchronous methods using C++20 coroutines. | ||
* Supports Multi-function operations. | ||
* Stored procedures. It can be used within Multi-function operations. | ||
* Text querie: MySQL refers to this as the "text protocol", as all information is passed using text (as opposed to prepared statements). | ||
* Prepared statements: MySQL refers to this as the "binary protocol", as the result of executing a prepared statement is sent in binary format rather than in text. | ||
|
||
|
||
### **EQUIVALENT DATA TYPES:** | ||
|
||
| DATA TYPE | GODOT DATA TYPE | C++ DATA TYPE | MYSQL DATA TYPE | | ||
| :-------: | :---------------: | :--------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------: | | ||
| NULL | null | std::nullptr_t | NILL | | ||
| BOOL | bool | bool | TINYINT | | ||
| INT32 | integer 32 | signed char, short, int, long, long long | SIGNED TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT | | ||
| INT64 | integer 64 | unsigned char, unsigned short, unsigned,<br />int, unsigned long, unsigned long long | UNSIGNED BIGINT, UNSIGNED TINYINT, SMALLINT,<br />MEDIUMINT, INT, BIGINT, YEAR, BIT | | ||
| FLOAT | float | float | FLOAT | | ||
| DOUBLE | float | double | DOUBLE | | ||
| BINARY | PackedByteArray | std::basic_vector<unsigned char, Allocator> | BINARY, VARBINARY, BLOB (all sizes), GEOMETRY | | ||
| CHAR | String | std::basic_string<char, std::char_traits `<char>`, Allocator> (including std::string),<br />string_view, std::string_view, const char* | CHAR, VARCHAR, TEXT(all sizes),<br />ENUM, JSON, DECIMAL, NUMERIC | | ||
| DATE | Dictionary | boost::mysql::date AKA std::chrono::time_point<br /><std::chrono::system_clock, days> | DATE | | ||
| TIME | Dictionary | boost::mysql::time AKA std::chrono::microseconds | TIME | | ||
| DATETIME | Dictionary | boost::mysql::datetime AKA std::chrono::time_point<br /><std::chrono::system_clock, std::chrono::duration<std::int64_t, std::micro>> | DATETIME, TIMESTAMP | | ||
| CHAR | PackedStringArray | std::basic_string<char, std::char_traits, Allocator> (including std::string),<br />string_view, std::string_view, const char* | SET | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Instructions for compilation: | ||
|
||
|
||
This module has two dependencies, Openssl and Boost. | ||
The dependencies will be automatically compiled during engine compilation. | ||
|
||
You do not need to compile dependencies every time you compile the engine, but you must recompile dependencies when updating Boost and/or Openssl or when you are compiling the module for some platform that you haven't compiled before. | ||
|
||
You can use the "recompile_sql" option when invoking scons to compile openssl and Boost or not. | ||
|
||
* All: It will compile BOTH Boost and Openssl. | ||
* openssl: It will only compile Openssl. | ||
* boost: It will only compile Boost. | ||
* none: It will **NOT** compile either Open or Boost. | ||
|
||
|
||
## Requirements: | ||
|
||
- A C++20 capable compiler as GCC, Clang (x11) , Visual C++ (Windows) or Apple Clang (Apple). | ||
- [**NASM - Only for Windows**](https://www.nasm.us/pub/nasm/releasebuilds/) | ||
- Git | ||
- All requirements to compile Godot. | ||
|
||
|
||
## Compilation: | ||
|
||
It is necessary recompile the engine together with this module. | ||
|
||
It is highly recommended to compile the engine with the "*precision=double*" option. | ||
|
||
Clone this repository inside the godot modules folder or an external folder with the following command to checkout all the dependencies: Boost and OpenSSL. | ||
|
||
``` | ||
git clone --recurse-submodules [email protected]:Malkverbena/mysql.git | ||
``` | ||
|
||
If you already checked out the branch use the following commands to update the dependencies: | ||
|
||
``` | ||
$ git submodule update --init --recursive | ||
``` | ||
|
||
In case you use an external folder, you must use "*custom_modules*" when invoke Scons. | ||
|
||
``` | ||
custom_modules=../path/to/mysql/folder | ||
``` | ||
|
||
compile the engine normally. | ||
|
||
You can use the command belloww to update the module the submodules at once. | ||
|
||
``` | ||
git pull --recurse-submodules | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters