Commit Graph

230 Commits

Author SHA1 Message Date
An Tao 80a8f62e30
Change the type of result from the mktime() function in model source code (#524) 2020-08-05 20:01:51 +08:00
An Tao 9c54fb8c69
Modify generation of models and the DbClient class (#498)
* Add setter method for automatical fields of models

* Put SQL queries into buffer before any connection being established

* Update trantor
2020-07-03 12:19:40 +08:00
An Tao 8f6269b208
Add a method to disable unicode escaping in json string (#491) 2020-06-24 08:11:32 +08:00
An Tao 3424d3f2c4
Add a way to set the character set when creating DbClient objects (#486) 2020-06-20 20:21:14 +08:00
An Tao 56b5d03fed
Remove the restriction on the location of layout tags in views (#484) 2020-06-18 21:44:54 +08:00
An Tao 4ebb72b0cf
Fix a bug with quoted column names in sqlite3 databases when using 'drogon_ctl create model'(#474) 2020-06-14 09:13:49 +08:00
Rafał Bugajewski 9e959397af
Fixed Model Generation for PostgreSQL Primary Keys (#471)
As per definition Drogon should return the last ID after an insert
when “a table contains an auto-increasing primary key”, but the
current detection mechanism isn’t enough to catch all cases.

PostgreSQL has the concept of generated identity columns that act as
primary key columns, but this information is held in the "is_identity"
column that wasn’t checked before.

This commit fixes #410, and also detects generated identity columns as
auto incrementing columns, so that the model generation correctly
appends " returning " statements.
2020-06-10 23:55:03 +08:00
antao 84e503a948 Bump version to 1.0.0-beta17 2020-05-23 10:47:24 +08:00
An Tao 7b1712003d
Modify drogon_ctl to show more compilation information (#441) 2020-05-21 21:14:40 +08:00
Rafał Bugajewski 398b028046
Pass Data From View to Its Layout Container (#429) 2020-05-09 14:13:20 +08:00
antao 8ecfe9ef84 Fix a bug in drogon_ctl 2020-05-07 18:57:03 +08:00
An Tao 490def6742
Add filters on static file locations (#422) 2020-05-03 08:21:34 +08:00
An Tao 4f8290b589
Remove non standard macros (#415) 2020-04-25 02:12:44 +08:00
interfector18 17b8c337f9
Standardize Row and Result api (#409)
* Standardize Row and Result api, throw specific exceptions

* Fix drogon_ctl for sqlite3 models

* Add mysql and sqlite3 tests, add exception throwing tests

* configure mysql in travis-ci

Co-authored-by: antao <antao2002@gmail.com>
2020-04-11 11:46:47 +08:00
An Tao c43ba9e514
Add support for brotli compression (#406) 2020-04-04 18:15:15 +08:00
An Tao 7af67dc4da
Make CMake install files relocatable (#387) 2020-03-18 19:54:48 +08:00
An Tao dd8fbe04cd
Addressed an issue when loading layout views dynamically (#378) 2020-03-12 10:26:07 +08:00
An Tao ebb8b7b70a
Add ENABLE_EXPORTS property in cmake configuration files (#375) 2020-03-05 22:03:41 +08:00
ihmc3jn09hk 686e30b250
Fix bug for PR #369 (#370)
Missing ">" for model.csp template
2020-03-01 18:07:21 +08:00
An Tao 8d17cc567e
Fix the 'many to many' relationship (#369) 2020-03-01 16:48:18 +08:00
An Tao 810896c94c
Fix warnings on Windows (#368) 2020-03-01 11:50:47 +08:00
ihmc3jn09hk 4bd19773b5
Update for ORM time mapper (#367)
The timelocal() function is equivalent to the POSIX standard function mktime(3). There is no reason to ever use it.
https://linux.die.net/man/3/timelocal
2020-03-01 02:33:01 +08:00
An Tao e171874524
Modify installation on Windows (#366) 2020-02-29 15:46:08 +08:00
An Tao ee77800821
Implement br_static (#359) 2020-02-23 17:39:03 +08:00
An Tao 71b60823da
Modify dynamic view loading algorithm (#339) 2020-02-16 17:19:16 +08:00
ihmc3jn09hk 3c15f65a7f
Add IOLoop access function. (#353)
Co-authored-by: An Tao <antao2002@gmail.com>
2020-02-16 16:48:35 +08:00
ihmc3jn09hk b733eee7e4
A small fix. (#345)
* Fix missed "password" fix for MySQL.

* Update trantor

Co-authored-by: An Tao <antao2002@gmail.com>
2020-02-08 11:08:11 +08:00
An Tao 3d8c304a47
Remove get_version.sh (#344) 2020-02-06 22:13:50 +08:00
An Tao dd5e8f8159
Support 'password' keyword in configuration files (#343)
* Support 'password' keyword in configuration files

* Update travis-ci
2020-02-04 10:58:10 +08:00
An Tao ce675c1b87
Fix a bug in views generation (#341) 2020-02-03 08:39:48 +08:00
An Tao 58702dc41e
Port drogon to Windows (#335)
Co-authored-by: mcirsta <mforce2@gmail.com>
2020-01-25 11:58:20 +08:00
antao fb2343ac74 Add location configuration for static resources (#331) 2020-01-12 11:05:38 +08:00
An Tao 1c99a8a94e
Use drogon::OStringStream instead of std::stringstream in text template (#322) 2020-01-01 16:15:11 +08:00
An Tao 5c1c73d9b6
Add the SecureSSLRedirector plugin (#306) 2019-11-30 08:35:40 +08:00
An Tao 40ffb2d2af
Modify some code styles (#298) 2019-11-21 11:27:47 +08:00
An Tao b34b3a6068
Fix a bug in dg_ctl for creating models of sqlite3 (#297) 2019-11-20 13:39:56 +08:00
An Tao a8ae91bee0
Make dg_ctl a symlink (#294) 2019-11-12 11:34:01 +08:00
An Tao dbf20200fc
Add the headers configuration option for static files (#290) 2019-10-31 15:47:12 +08:00
An Tao 876e21f492
Implement relationships in ORM (#288) 2019-10-26 23:44:31 +08:00
WojciechMigda c9076220ac Fix size_t underflow (#272)
This fixes abnormal behaviour when controller without namespace
is being created
2019-10-06 09:43:08 +08:00
An Tao 70eda27427
Add the ability to create restful API controllers (#244)
* Add the ability to create restful API controllers

* Update the model.json template file

* Modify the 'create controller' command of the drogon_ctl

* access column values by column array indexes instead of column names when constructing an instance of a model class

* Fix a bug of mysql database

* Add some static SQL into models

* Add validations to models

* Add setToNull method to models

* Support 'where in' substatement

* Delay rendering from json to the response body. This allows users to modify the json object before sending a response.

* Add synchronous method to the HttpClient class
2019-09-30 21:34:30 +08:00
Daniel Mensinger 795079531a cmake: use export namespace for Drogon::Drogon (#255)
* cmake: use ${PROJECT_NAME} instead of drogon everywere

* cmake: use export namespace instead of dummy library
2019-09-26 19:33:58 +08:00
An Tao 456d003482
Add prefixes to column name variables in model classes (#242) 2019-09-13 08:28:58 +08:00
An Tao 1e83a5cc4e
Fix a bug of creating models for mysql (#237) 2019-09-10 15:58:42 +08:00
An Tao aaaba8aa97
Fix a bug of models (#239) 2019-09-10 15:14:57 +08:00
An Tao 6ef7cffabb
Add the schema option for creating models (pg database only) (#238) 2019-09-10 13:46:10 +08:00
An Tao 657dc840a9
Modify the processing of bool type column in ORM (#231) 2019-09-02 07:47:36 +08:00
An Tao eb894396c7
Use find('x') instead of find(x) in a string search (#230) 2019-09-01 12:06:19 +08:00
An Tao aa26e9a903
Modify the CMakeLists to modern cmake style (#229) 2019-08-31 08:27:57 +08:00
An Tao a0b68fb3c9
Optimize request headers processing (#228) 2019-08-27 13:55:52 +08:00