[Kmymoney-devel] Review Request 122138: [GCI2014] Find the maximum in a set of numeric strings.
Daniel Ring
dring at g33kworld.net
Wed Jan 21 08:35:04 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122138/
-----------------------------------------------------------
(Updated Jan. 21, 2015, 12:35 a.m.)
Review request for KMymoney and Christian David.
Changes
-------
I implemented your changes and the new test, and the function now passes both tests.
As for query compatibility, SUBSTR() works in both [MySQL](https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_substr) and [PostgreSQL](http://www.postgresql.org/docs/9.4/static/functions-string.html). The CAST("string" AS INTEGER) is more difficult, as [MySQL](https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_cast) requires either SIGNED or UNSIGNED instead of INTEGER. [PostgreSQL](http://www.postgresql.org/docs/9.4/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS) should handle it properly, but the documentation wasn't entirely clear.
I'm enjoying this work, and I'd like to continue with it if you don't mind. Thank you again for the help!
Bugs: 339103
http://bugs.kde.org/show_bug.cgi?id=339103
Repository: kmymoney
Description
-------
This adds a function to retrieve the highest ID number from the database. The IDs are prefixed by a short identifier string, and are stored in the database as strings.
This review request was created as a part of Google Code-In 2014. The specific task it refers to can be found here: https://www.google-melange.com/gci/task/view/google/gci2014/5774859095244800
Diffs (updated)
-----
kmymoney/mymoney/storage/mymoneydatabasemgrtest.h 07fc175cd9381ef0fc7ad314cf905c22a43fca81
kmymoney/mymoney/storage/mymoneydatabasemgrtest.cpp 642fc53d9e220f34e463b2a27ab9a5d4b0c1e3ec
kmymoney/mymoney/storage/mymoneystoragesql.h 469c0f47d61df783f48787660f526fccdf5264a4
kmymoney/mymoney/storage/mymoneystoragesql.cpp fa9fbdf7d77eaa4922302d1f583317212af45ddf
Diff: https://git.reviewboard.kde.org/r/122138/diff/
Testing
-------
I created a small sample database with SQLite and verified that the SQL statment worked properly. I was able to successfully build and run KMyMoney with this function included in Debian Stable (using cmake 2.8.11.1 from backports). However, I was unsure how best to test the function itself, so please let me know if any issues arise.
Thanks,
Daniel Ring
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kmymoney-devel/attachments/20150121/fa85b6cf/attachment-0001.html>
More information about the KMyMoney-devel
mailing list