https://bugs.kde.org/show_bug.cgi?id=393094

Jarosław Staniek <stan...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://commits.kde.org/kdb |https://commits.kde.org/kdb
                   |/42ecae68aa5585042a1b07c270 |/28ade683a351ef0d68c772f1e3
                   |891b3dfe5da520              |6b316755370939
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Jarosław Staniek <stan...@kde.org> ---
Git commit 5b700dfd7c0d266f2da0fc914d1b0c0fe443d287 by Jaroslaw Staniek.
Committed on 04/01/2019 at 21:03.
Pushed by staniek into branch '3.2'.

Add support for the Date/Time constants in the SQL parser

- improve lexer too
- obsolete previous approach for SQL default date support
- and for SQLite, add new APIs for converting date/times

https://community.kde.org/Kexi/Plugins/Queries/SQL_Constants

M  +108  -4    src/KDb.cpp
M  +136  -15   src/KDb.h
M  +16   -18   src/KDbDriver.cpp
M  +43   -3    src/KDbDriver.h
M  +2    -2    src/KDbField.cpp
M  +1    -1    src/KDbQuerySchema.cpp
M  +7    -2    src/KDb_p.h
M  +2    -3    src/drivers/postgresql/PostgresqlCursor.cpp
M  +1    -1    src/drivers/sqlite/SqliteCursor.cpp
M  +2    -2    src/drivers/sqlite/SqlitePreparedStatement.cpp
M  +20   -8    src/expression/KDbConstExpression.cpp
M  +7    -4    src/parser/KDbParser.cpp
M  +1    -1    src/parser/KDbParser.h
M  +150  -2    src/parser/KDbSqlParser.y
M  +52   -1    src/parser/KDbSqlScanner.l
M  +4    -1    src/parser/generate_parser_code.sh
M  +4    -0    src/parser/generated/KDbToken.cpp
M  +5    -1    src/parser/generated/KDbToken.h
M  +566  -356  src/parser/generated/sqlparser.cpp
M  +13   -3    src/parser/generated/sqlparser.h
M  +390  -295  src/parser/generated/sqlscanner.cpp
M  +1    -1    src/tools/KDbUtils.cpp

https://commits.kde.org/kdb/5b700dfd7c0d266f2da0fc914d1b0c0fe443d287

--- Comment #7 from Jarosław Staniek <stan...@kde.org> ---
Git commit 81ad5897692ccbc77f0b300602cefbf08e3ff070 by Jaroslaw Staniek.
Committed on 04/01/2019 at 21:03.
Pushed by staniek into branch '3.2'.

Add autotests for the KDb date/time classes

GIT_SILENT

M  +1    -0    autotests/CMakeLists.txt
A  +96   -0    autotests/DateTimeTest.cpp     [License: LGPL (v2+)]
A  +42   -0    autotests/DateTimeTest.h     [License: LGPL (v2+)]

https://commits.kde.org/kdb/81ad5897692ccbc77f0b300602cefbf08e3ff070

--- Comment #8 from Jarosław Staniek <stan...@kde.org> ---
Git commit c2fcf8a68170cb0df7757375dc35cef0896dcc15 by Jaroslaw Staniek.
Committed on 04/01/2019 at 21:03.
Pushed by staniek into branch '3.2'.

Add autotests for date/time related KDBSQL statements

GIT_SILENT

M  +44   -15   autotests/ExpressionsTest.cpp
M  +247  -2    autotests/parser/data/statements.txt

https://commits.kde.org/kdb/c2fcf8a68170cb0df7757375dc35cef0896dcc15

--- Comment #9 from Jarosław Staniek <stan...@kde.org> ---
Git commit 28ade683a351ef0d68c772f1e36b316755370939 by Jaroslaw Staniek.
Committed on 04/01/2019 at 21:06.
Pushed by staniek into branch '3.2'.

Restore support for date/time constants in KEXI SQL

Merge branch '393094-date-constants-3.2' into 3.2

- Add Date/Time classes for precise type support
- Add autotests for the KDb date/time classes
- Add support for the Date/Time constants in the SQL parser
- improve lexer too
- obsolete previous approach for SQL default date support
- and for SQLite, add new APIs for converting date/times

https://community.kde.org/Kexi/Plugins/Queries/SQL_Constants

- Add autotests for date/time related KDBSQL statements

KDb VERSION -> 3.2.0 Beta 1

Test Plan:
Precondition: KDb branch: 393094-date-constants against 3.2 branch, KEXI branch
393094-date-constants (D17847)

0. Run KDb autotests
Expected: 100% passes

1. Open a new design in KEXI Query Designer.
Note: Visual designer does not support these constants, use the SQL view.

2. Type a number of statements involving Date, Time and Date/Time constants

You can use test cases from autotests/parser/data/statements.txt, sections:
- Date Constants (KDbSQL EXTENSION)
- Time Constants (KDbSQL EXTENSION)
- Date/Time Constants (KDbSQL EXTENSION)

Use the Check Query button to try both valid and invalid constants. For example
"SELECT #12:13:01#" should work and "SELECT #2018-11-37#" should be rejected as
invalid constant.

Expected: Valid constants should be accepted and then data view should work,
there should be warning for invalid constants.
Expected: Saving of both valid and invalid statements should be possible in the
SQL view.

{F6453115}

3. Create table with columns of type date, time and date/time and add some
records.

4. Open a new design in Query SQL Designer, create statements involving both
constants and columns
 e.g. SELECT #12:13:01# AS expr1, timecolumn FROM table where table.timecolumn
< #2018-11-37#

Expected: valid statement, the Data view works.

{F6453113}

5. Test all of the above for SQLite, pgsql, mysql.

Differential Revision: https://phabricator.kde.org/D17336


https://commits.kde.org/kdb/28ade683a351ef0d68c772f1e36b316755370939

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to