Forum > Database

Typhoon relational database

(1/4) > >>

funlw65:
Update:
Now ty.pas got it's own repository at gitlab. https://gitlab.com/funlw65/typhoon-pas
The following changes were made:
- ty.pas unit got reworked to accept static or dynamic/shared libraries. By default, it will include the static library - you have to define TYPHOON_STATIC before including ty unit in your main program;
- the graphical application and the raylib units were removed;
- the tytest.pas console app got reworked to be a little more useful;
- the README.md file is now, hopefully, more comprehensive.

Original Post:
This is a little precious database engine (you will agree with me if you read de docs) written in C language. I used it many years ago in a project, then forgot about it. Nowadays I'm glad to find out that it still compiles ok in a Linux environment (Debian 10 and derivatives and gcc 8.3.0) So I wrote a quick database application to test it and to familiarize myself also with raylib/raygui graphical libraries. A small pigeon breeds database, which can be downloaded and tested from here:

https://gitlab.com/funlw65/squabdb-c

The README.md contains a screenshot of the main form of the application and links to the C libraries used. So, I started converting the app in FreePascal language, and it seems that the typhoon database can be easily converted/interfaced for Pascal using h2pas utility. Well, I'm not expert on this matter and there still are two functions that I was not able to translate them, but it will not affect the project.

Zvoni:
For completeness sake (untested!)

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Type  TProcKeyBuild:Procedure (_para1:Pchar; _para2:longword; _para3:longword);  TProcSetErr  :Procedure (_para1:longint; _para2:longint); //Function d_keybuild(_para1:Procedure (_para1:Pchar; _para2:longword; _para3:longword)): integer;cdecl;external cDllName;Function d_keybuild(_para1:TProcKeyBuild): integer;cdecl;external cDllName; //Function d_seterrfn(_para1:Procedure (_para1:longint; _para2:longint)): integer;cdecl;external cDllName;Function d_seterrfn(_para1:TProcSetErr): integer;cdecl;external cDllName; But i'm weary of this conversion in general. Use ctypes for conversions

funlw65:
Thank you Zvoni, I appreciate! I had some things to do, but done now and I will start in translating the app to pascal. Actually, most of it is done, as I wrote it for the qdbm database first, hit some walls then translated the pascal app in C, then in the end changed the database engine to typhoon and now back to pascal :P

funlw65:
Done! Not fully tested, but I think is ok.

https://gitlab.com/funlw65/squabdb-pas

Inside the code is a little useful "gadget", deactivated as a comment :) 
The app comes with two themes, dark and light.

Roland57:
Very interesting.  :)

I could compile and run successfully the C demo (with the static lib, on Linux Mageia). Very nice! (By the way, it was very easy to install raylib.)

For the Pascal demo, I have to find how to build libtyphoon.so.

Could you share the binary, or explain how you built it?

Navigation

[0] Message Index

[#] Next page

Go to full version