Closed xdien closed 7 years ago
Can you please put full output?
Sorry for the late. All output here when I run tst_basic.pro
/home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp: In member function ‘void MainTest::selectPosts()’: /home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp:102:26: error: ‘class Nut::TableSet
’ has no member named ‘createQuery’ auto q = db.posts()->createQuery(); ^ /home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp:104:39: warning: suggest parentheses around operand of ‘!’ or change ‘&’ to ‘&&’ or ‘!’ to ‘~’ [-Wparentheses] q->orderBy(!Post::saveDateField() & Post::bodyField()); ^ /home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp: In member function ‘void MainTest::selectPostsWithoutTitle()’: /home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp:124:26: error: ‘class Nut::TableSet ’ has no member named ‘createQuery’ auto q = db.posts()->createQuery(); ^ In file included from /home/xdien/workspace/nhansu/Nut/src/database.h:28:0, from /home/xdien/workspace/nhansu/Nut/test/common/weblogdatabase.h:4, from /home/xdien/workspace/nhansu/Nut/test/basic/maintest.h:7, from /home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp:7: /home/xdien/workspace/nhansu/Nut/test/basic/maintest.cpp: In member function ‘void MainTest::selectComments()’: /home/xdien/workspace/nhansu/Nut/src/defines.h:112:63: error: ‘class Nut::TableSet ’ has no member named ‘createQuery’ https://pastebin.com/z0d6jBie
Sorry that is my mistake, createQuery() renamed to query(). I will push a new commit to correct tests (if you need so) within next 24hrs. Of course you can do a s/createQuery/query/g
I have changed some lines of code, I think it will make this library run more stable. Can you let me contribute it?
In the last commit syntax changes applied to maintest Some other changes is in my todo list, after that changes Nut will be stable enough to using in big applications.
I have changed some lines of code, I think it will make this library run more stable. Can you let me contribute it?
Absolutely yes. Make a fork and feel free to pull requests.
Thanks you very much!
I tried running the program but could not build.
auto q = db.posts()->createQuery(); q->join(Post::commentsTable()); q->orderBy(!Post::saveDateField() & Post::bodyField()); q->setWhere(Post::idField() == postId);
How can fix it? Thanks you