MyFirstUDRKit/Readme.md

88 lines
2.5 KiB
Markdown
Raw Normal View History

2023-01-19 16:52:34 +01:00
# MyFirstUDRKit
2023-02-06 13:00:40 +01:00
Welcome to MyFirstUDRKit. As you can tell from the name, this plugin is not intended for production use. It is just to play with. When you are ready feel free to fork it and give it a new name.
### Forking the repository
For test purposes you can just clone the repo and try building and testing the code. However, for serious work it is recommended that you clone the repo and give the project a new name. When doing so be sure to search and replace all references to MyFirstUDRKit to your new project name. There are two strings to replace:
```
MyFirstUDRKit
MY_FIRST_UDR_KIT
```
2023-01-23 16:18:30 +01:00
2023-02-06 12:39:22 +01:00
### Setting up cmake
2023-02-06 13:30:21 +01:00
Run the cmake gui and fill in the path information. Set the source to the root of the location where you have cloned the repo. CMake looks for the file `CMakeLists.txt`. Binaries will be built under `build/x86_64-win64` and `build/x86_64-linux` for linux.
2023-02-06 12:39:22 +01:00
2023-02-06 13:00:40 +01:00
![cmake - pre-config](docs/images/cmake_before_config.png "cmake pre-config")
2023-02-06 12:39:22 +01:00
2023-02-06 13:38:18 +01:00
Click on Configure to generate the default config for the current platform. This will open a dialogue. When prompted choose the `Unix makefiles` generator for linux. Under Windows choose `Visual Studio 15 2017` and be sure to set the `Optional platform for generator` to x64 for windows as in the screenshot below:
2023-02-06 13:30:21 +01:00
![cmake - windows generator](docs/images/cmake_generate_options_windows.png "cmake windows generator")
2023-02-06 13:38:18 +01:00
Click on `Finish` and you should then see a screen similar to this:
2023-02-06 12:48:05 +01:00
2023-02-06 13:00:40 +01:00
![cmake - config](docs/images/cmake_config.png "cmake config")
2023-02-06 12:48:05 +01:00
2023-02-06 13:38:18 +01:00
Under linux the only change needed at this stage is to set `CMAKE_BUILD_TYPE to `Debug`. Under Windows there should be nothing further to do.
2023-02-06 12:39:22 +01:00
2023-02-06 13:00:40 +01:00
You can then click on `Generate` and you should end up with a screen similar to this:
![cmake - config](docs/images/cmake_generate.png "cmake generate")
2023-02-06 12:39:22 +01:00
If you want to start again be sure to click on `FILE|DELETE CACHE`
2023-01-23 16:18:30 +01:00
### Building the kit
On linux just do:
2023-01-23 16:18:30 +01:00
```
2023-02-06 13:30:21 +01:00
cd build/x86_64-linux
2023-01-23 16:18:30 +01:00
make
```
On windows just open the solution in visual studio.
2023-01-25 09:54:20 +01:00
### Testing
There is a test suite available for testing under linux in the `test` directory.
2023-01-25 09:54:20 +01:00
### Stress testing
TO DO
2023-01-25 09:54:20 +01:00
- compile fb for valgrind
- stress test for leakage
### Installation
#### run the sql on the target database
TO DO
### When things go wrong
#### Errors when registering a function
```
Invalid index 1 in function IMetadataBuilder::setType
```
This error indicates that the parameters in the sql function declaration do not match the parameters in the actual function. Check your sql with the FB_UDR_MESSAGE declarations.