Commit Graph

43 Commits

Author SHA1 Message Date
An Tao
d023743fa3
Fix a bug when creating models in some special cases (#577) 2020-09-17 20:48:16 +08:00
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
ihmc3jn09hk
686e30b250
Fix bug for PR #369 (#370)
Missing ">" for model.csp template
2020-03-01 18:07:21 +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
40ffb2d2af
Modify some code styles (#298) 2019-11-21 11:27:47 +08:00
An Tao
876e21f492
Implement relationships in ORM (#288) 2019-10-26 23:44:31 +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
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
4e274b1a2e
Modify the orm command of drogon_ctl (#224) 2019-08-24 18:43:05 +08:00
An Tao
b5a142a10e
Fix bugs in default return values of functions (#220) 2019-08-22 22:23:50 +08:00
An Tao
f940b6f2cd
Modify some stuff (#216) 2019-08-17 20:05:32 +08:00
antao
40087fba9c Remove config.h
Modify the CMakeLists.txt

Remove the USE_ORM macro

Update trantor

Remove some std::dynamic_pointer_cast calls
2019-07-29 14:53:41 +08:00
antao
fa9376b89a Change escapes from '{{}}' to '[[]]' in views 2019-04-25 14:36:42 +08:00
antao
801cb8aa35 Modify some database classes 2019-03-07 11:56:20 +08:00
antao
926ac48b49 Modify drogon_ctl 2018-12-29 18:02:39 +08:00
antao
787120dda4 Add support for sqlite3 models 2018-12-29 13:12:36 +08:00
antao
71faac9fb2 Modify the drogon_ctl 2018-12-07 19:08:17 +08:00
antao
52546b7846 Modify the model generator for time-type columns 2018-12-03 10:13:31 +08:00
antao
25548eaaa0 The mysql client works 2018-12-03 10:13:31 +08:00
antao
cba0252bc1 Add FindMySQL.cmake to the project generated by drogon_ctl 2018-12-03 10:13:31 +08:00
antao
81540ca19b Add a database test 2018-11-27 17:37:41 +08:00
antao
afd1bf986a jsoncpp int64 2018-11-23 19:46:59 +08:00
antao
f829e10dfa Modify the signature of some functions 2018-11-20 14:54:51 +08:00
antao
fe16066a4b Add the toJson() method to the database model 2018-11-20 14:08:08 +08:00
antao
9ee0ef6cc8 Modify the creation of models 2018-11-20 10:54:46 +08:00
antao
ad37969535 1.Fix a memory bug;
2.Support for bytea type of postgreSQL;
2018-11-19 18:15:41 +08:00
antao
4b8971b258 Fix some warnings 2018-11-11 18:51:39 +08:00
an-tao
6e5eef9aaf Fix some warnings 2018-11-09 15:55:20 +08:00
antao
de3c31f34b Support timestamp column type 2018-11-09 15:46:39 +08:00
antao
f9cc77daa0 Fix a bug of struct tm 2018-11-09 15:46:39 +08:00
antao
32a7c5aff6 Support composite primary key 2018-11-09 15:46:39 +08:00
antao
4e060b7726 Support date type in ORM 2018-11-09 15:46:39 +08:00
an-tao
fc7ddd5b6c Fix some warnings in linux 2018-11-09 15:46:39 +08:00
antao
acaa604559 Fix some bugs in models 2018-11-09 15:46:39 +08:00
antao
6810dd261c Modify models template 2018-11-09 15:46:39 +08:00
antao
16d6caedb0 Remove 'setter' methods of auto-increasing columns 2018-11-09 15:46:38 +08:00
antao
143b62b36b Fix some bugs in creating models 2018-11-09 15:46:38 +08:00
antao
d340e1cc10 Update model template files 2018-11-09 15:46:38 +08:00
antao
0d77fa1490 Improve the function of creating models 2018-11-09 15:46:38 +08:00