Commit graph

50 commits

Author SHA1 Message Date
eelke
fbbe832a05 Start of new ANTLR4 based parser.
Very simple tests pass.
2022-04-03 12:27:35 +02:00
eelke
e2d67dee70 Disable the tests i'm not going to make work right now. 2022-02-06 14:21:50 +01:00
eelke
23e61c6c95 Fix broken unittest.
Was probably broken by a change in Qt. Now using custom parser.
(I also tested a regex based parser but that was more then 80 times slower)
2022-02-06 14:15:16 +01:00
eelke
a7f247bdee Cleanup 2022-01-21 18:54:50 +01:00
eelke
4c175d8c2c Added page with the types (no details yet) 2021-04-01 14:58:42 +02:00
eelke
7fbc828326 misc stuff 2021-03-06 13:15:17 +01:00
eelke
817a371220 Removed rangechecked_cast was not working as I hoped. 2019-11-30 16:11:12 +01:00
eelke
f875f0f012 Implementation, tests and first use of rangechecked_cast 2019-11-04 18:02:48 +01:00
eelke
05bca069e3 Fix escaping of special chars for copyAsCString 2019-11-02 14:54:55 +01:00
eelke
082293e58a Switched ConnectionConfig to QString from std::string to fit better into Qt framework 2019-09-16 19:24:39 +02:00
eelke
48ac8c6bab Improved generation of c/cpp string from query
Extra lines before and after query are removed. Whitespace at end of line
is removed. SQL comments are converted to cpp style comments and are outside
the string literal.

To achieve this the function now uses the SQLLexer to know what is comment.
This also required the additional capability in the lexer to also return whitespace and newline tokens.
Also a few bugs in the lexer were fixed.
2019-08-19 13:52:23 +02:00
eelke
fbd630489e Added paste lang option for pasting programming code.
Expects you to paste only string literals with possible concatenation operators like . or +
2019-08-19 11:38:04 +02:00
eelke
d7763e83bf More projects fixes. 2019-03-27 18:50:58 +01:00
Eelke Klein
e7bfaeff9a project file cleanup
Moving system dependent parts into local.pri which is not tracked and supply local.pri.sample as a template for developers to adjust for their local system.
2019-03-24 08:53:22 +01:00
eelke
39ac8ef02d Some work on parser, not used yet. 2019-01-28 20:53:10 +01:00
eelke
3b482c1c73 Fix lexer for empty input. 2019-01-28 20:52:39 +01:00
eelke
b210c570fc ArrayParser doesn't require the string to be null terminated anymore,
instead the length of the string can be passed in.

This is first step in process to allow Value to work without null terminator.
2018-12-24 08:10:09 +01:00
eelke
646b18ebeb Update tests for moved include files. 2018-12-23 08:42:32 +01:00
eelke
fcb191f2cc Overview of triggers extended with function name and arguments.
Did a lot of refactoring on the catalog to keep things clean.
2018-11-18 19:30:45 +01:00
eelke
104ab5de1e Codegen now supports the database column type in the field template.
This allows for inserting it as a comment which is very useful while
tweaking your typemappings as you can see what the input was.
2018-11-17 10:14:31 +01:00
eelke
be0064f730 The codegen now can properly lookup array types.
Array type lookup failed previously because the typemapping class was
not yet receiving the list of types from the database. Fix was to pass
this data
2018-11-17 09:47:50 +01:00
eelke
f629e48a85 Position of error marks is adjusted for selection.
Close: #20
2018-11-10 10:59:52 +01:00
eelke
e36924c087 Passwords are now saved in a password manager.
The password manager uses strong encryption using a key derived from the passphrase using
scrypt key strengthening algorithm. This ensures encryption is performed using a strong key
and that brute forcing the passphrase is time consuming.

If the user loses his passphrase no recovery is possible.
2018-11-08 21:50:49 +01:00
eelke
6b9b602c64 Replaced old PasswordManager code with code using Botan's new PSK_Database
This greatly reduces the amount of encryption related code required. Thought
we still have todo our own key strenthening but this also is easier with Botan::PasswordHash.
2018-11-04 11:24:13 +01:00
eelke
092ed67d5e Working on generating string literals for inclusion in generated code. 2018-09-21 11:41:20 +02:00
eelke
e4ccd93b09 Better support for boost::optional in database layer. 2018-09-19 08:25:23 +02:00
eelke
780d912cd1 Adjusted project files for new boost version.
This should be handled differently the location of boost should not be baked into the project files.
2018-09-18 20:24:54 +02:00
eelke
f5145f36ed wip: codegenerator, basic widget present for showing the generated code and specifying
parameters. Some code is also generated but it is not complete yet.

minimum still required
- field assignments
- properly format and escape the query string
2018-09-18 11:54:43 +02:00
eelke
daf9536bed Moved typemapping test code to its own unit so it is clearer that the tests exist 2018-09-18 07:45:49 +02:00
eelke
22bad8fb22 Added name mangling tests. 2018-09-17 15:41:47 +02:00
eelke
8f4845d4d2 Lot of code for generating code. Working on unit tests. 2018-09-09 21:04:23 +02:00
eelke
da45929b12 Fix SqlLexer test 2018-09-09 16:20:30 +02:00
eelke
914d2fe9fa Lexical analyzer should now be less confused by dots and comma's and an assortment of other single character symbols. 2018-02-05 22:25:38 +01:00
eelke
ee321b3fb1 Bunch of tests were in header files so they all got compiled when main got compiled.
Prefer to have them in seperate compilation units for faster make times when changing tests.
Also parallel build is faster with seperate cpps.
2018-01-07 09:19:19 +01:00
eelke
c23282cc7a Folder restructuring of test projects. 2018-01-07 09:15:21 +01:00
eelke
b436814eb5 THe SqlLexer also now recognizes casts. 2018-01-06 21:18:28 +01:00
eelke
db75d9ed50 More flexible array retrieval + *vector support. 2017-12-17 11:27:42 +01:00
eelke
d9854d81fa Improved error checking in Value + more to array conversion control. 2017-12-17 09:06:18 +01:00
eelke
1fe7d3c56d . 2017-12-16 21:43:51 +01:00
eelke
8f1ba8130c Unit tests on PasswordManager are now much faster because the tests use a much
lower iterations count now then the default setting.
2017-12-16 21:42:41 +01:00
eelke
2ad4a2601f Value::getAsArray function to parse array convert to correct type and
uses inserter to fill container.

Unit tests included.
2017-12-16 21:41:16 +01:00
eelke
ec930218cd Implemented ArrayParser and unit tests to verify its working. 2017-12-16 10:31:51 +01:00
eelke
dec52a3829 Unit tests for ParamList to json. 2017-12-09 19:39:37 +01:00
eelke
3a13b7ffb4 Messy commit. Testing suff and some improvements to how data is shown. 2017-12-09 10:45:13 +01:00
Eelke Klein
7c4e8e95e8 Restructured locations of source. 2017-08-27 07:36:42 +02:00
Eelke Klein
78a4c6d730 Remove use of ASSERT_THAT 2017-08-26 19:07:01 +02:00
Eelke Klein
4c658d7811 Added the test to CMakeLists.txt, all tests OK. 2017-08-26 15:53:15 +02:00
eelke
d0ea9dfa0c Moved some parts to a static lib so both the executable and the tests can link to it.
Written additional tests.
2017-02-26 19:29:50 +01:00
eelke
2f95c2f096 Started on window for managing the server. 2017-02-12 08:15:09 +01:00
eelke
f51105bde0 megamove 2017-02-11 08:15:01 +01:00