Johannes Meyer
f16a54242a
DbQuery: Account for daylight savings in `timestampForSql()`
...
fixes #4568
2022-02-10 16:48:36 +01:00
Johannes Meyer
0fc06d7795
Transform `*` equal/unequal comparisons to NULL checks
...
This comes from https://github.com/Icinga/ipl-sql/pull/31
2021-03-12 09:50:59 +01:00
Johannes Meyer
b288d86e91
DbQuery: Return non-string args as is in `valueToTimestamp()`
...
fixes #4182
2020-06-24 14:09:13 +02:00
Eric Lippmann
c8ed889114
Fix operator in wildcard filter chains
2019-08-13 17:19:45 +02:00
Eric Lippmann
31d3153d2b
Support wildcard filters in chains ( #3903 )
2019-08-12 13:41:38 +02:00
Johannes Meyer
0152a5941d
DbQuery: Fix wrong operator precedence when rendering unequal filters
...
fixes #13107
refs #12852
2016-11-10 13:10:31 +01:00
Alexander A. Klimov
7d94c1fddb
DbQuery: handle strange NULL comparision results
...
refs #12852
2016-10-20 15:40:33 +02:00
Eric Lippmann
fee45a2438
Database: Never ignore asterisk filters
...
fixes #11885
2016-06-02 17:27:32 +02:00
Alexander A. Klimov
474803fee4
Change all license headers to only reflect a file's year of creation
...
refs #11000
2016-02-08 15:41:00 +01:00
Johannes Meyer
8dd1ad869f
DbQuery: Mark method renderFilter() deprecated
2015-12-07 10:31:25 +01:00
Johannes Meyer
5be48fc923
DbQuery: Do not call Zend_Db_Select::columns() unless it's necessary
...
This makes it possible to just use a DbQuery as "union container" without
ever calling from() on it.
2015-12-03 13:53:34 +01:00
Johannes Meyer
28cd9681c8
DbQuery: Add method union()
2015-12-03 13:50:01 +01:00
Johannes Meyer
b182a31b90
DbQuery: Catch exceptions in __toString()
2015-11-12 16:32:29 +01:00
Johannes Meyer
1e35a17ec1
DbQuery: Support not equal comparisons with arrays
2015-11-05 15:49:15 +01:00
Johannes Meyer
0695d5900c
Merge branch 'master' into feature/less-costly-count-queries-for-history-views-8615
2015-08-06 13:11:28 +02:00
Eric Lippmann
528382098e
db: Respect group by for count queries, really
...
Missed that Johannes introduced DbQuery::getGroup().
refs #9828
2015-08-06 10:46:40 +02:00
Johannes Meyer
a0d5509f19
DbQuery: Drop attribute $maxCount
...
It's not used anywhere and completely useless the way it's implemented.
2015-08-05 10:54:14 +02:00
Eric Lippmann
064e821383
lib: Fix wrong count for queries having a group by clause
...
fixes #9828
2015-08-04 16:25:34 +02:00
Johannes Meyer
16e54d3987
DbQuery: Be less error-prone while calling array_search
2015-07-31 11:05:23 +02:00
Johannes Meyer
9595809dfa
SimpleQuery: Deep clone the filter when cloning the query
2015-06-24 14:33:11 +02:00
Johannes Meyer
d5ae135415
DbQuery: Add select() method to access self::$select publicly
2015-06-19 14:05:12 +02:00
Johannes Meyer
1169793213
IdoQuery: Add prototype for dynamic GROUP BY clauses
2015-06-18 09:36:04 +02:00
Johannes Meyer
386447b847
DbQuery: Add getter for GROUP BY clauses
...
Allows to override this in a child to provide group by clauses not
until they are actually required.
refs #9009
2015-06-18 09:29:58 +02:00
Johannes Meyer
b8efe314a0
DbQuery: Ignore wildcard only filters
...
This increases query performance vastly, since LIKE '%' comparisons
prevent the dbms from utilizing an index.
2015-06-15 13:59:46 +02:00
Eric Lippmann
8cbb83d630
Merge branch 'master' into feature/monitoring-restrictions-9009
2015-06-05 15:29:16 +02:00
Eric Lippmann
ae78613443
lib: Add sub query mode to the DbQuery
...
refs #9009
2015-06-03 14:13:15 +02:00
Johannes Meyer
119b2fdddb
DbQuery: Allow to join additional tables
...
This should just be the beginning of such additions, there is still a group(),
distinct(), etc missing..
2015-05-28 13:52:00 +02:00
Johannes Meyer
58d78f59f3
DbQuery: Initialize self::$select as early as possible
...
I'd like to use Zend's implementation instead of re-inventing the wheel just
because someone decided to only work with a copy of it in the frameworks
query but do exactly the opposite in the monitoring module's IDO query...
2015-05-28 13:49:36 +02:00
Johannes Meyer
ec556edc65
Merge branch 'master' into feature/user-and-group-management-8826
2015-05-26 09:28:35 +02:00
Eric Lippmann
83a6e85b5d
lib: Don't render empty filters to SQL
...
Else we are presented with syntax errors.
fixes #9211
2015-05-22 13:53:57 +02:00
Johannes Meyer
a1276fd709
Benchmark all queries by default, not only db queries
2015-05-19 09:41:18 +02:00
Johannes Meyer
7b6ca0826b
DbQuery: Let the DbConnection do the count query
2015-05-19 09:34:22 +02:00
Eric Lippmann
6bae2e0a53
Note that our license is GPL v2 or any later version in our license header instead of pointing to the license's URL
2015-02-04 10:52:27 +01:00
Eric Lippmann
5b4fab0750
Add license header
...
This time without syntax errors hopefully :)
2015-02-03 16:27:59 +01:00
Eric Lippmann
5fa2e3cfdc
Revert "Add license header"
...
This reverts commit 338d067aba
.
2015-02-03 16:16:26 +01:00
Eric Lippmann
338d067aba
Add license header
...
fixes #7788
2015-02-03 15:51:04 +01:00
Johannes Meyer
38957e340b
Fix that DbQuery::renderFilter produces invalid filters
...
fixes #7749
2014-11-20 11:58:22 +01:00
Thomas Gelf
b2a55f0998
Db\DbQuery: do not expose applyFilterSql
2014-11-16 17:09:51 +01:00
Thomas Gelf
5ea2f33efb
Db\DbQuery: add NOT LIKE support
2014-11-16 17:08:50 +01:00
Thomas Gelf
90f1ab06b4
Db\DbQuery: add "deep" clone support
...
Still far from being complete, Zend_Db_Select makes life really hard for
us. More to come...
2014-11-16 17:06:26 +01:00
Eric Lippmann
94f8597271
Add existing GROUPBYs to count queries
2014-11-13 16:42:11 +01:00
Eric Lippmann
0e34001568
Use automatically a subquery when counting with groups
2014-11-13 16:42:11 +01:00
Johannes Meyer
77f5bc3932
Use GROUPBY instead of DISTINCT and subqueries when counting
2014-11-13 16:42:11 +01:00
Alexander Fuhr
afc97b1cac
Fix the duplicate entries in monitoring list shows
...
refs #7057
refs #7344
fixes #7057
2014-10-08 12:30:08 +02:00
Alexander Fuhr
97d2a920db
Implement GROUP BY clause functionality
2014-10-06 11:34:04 +02:00
Eric Lippmann
64d41ac5a3
filter: Make `DbQuery::applyFilterSql()' public
...
I want to use that function in a module :)
2014-10-01 12:51:28 +02:00
Eric Lippmann
90dbcdbbfb
The stupid `DbQuery::isTimestamp()' hack must return false
...
This a fix for modules using our query / filter combination since `return $this;' renders all columns as timestamps.
2014-09-19 14:29:29 +02:00
Marius Hein
30f391035c
Postgres/DbQuery: Add orderfields to select
...
refs #6896
2014-09-01 10:00:04 +02:00
Alexander Klimov
45638b218c
Throw IcingaException rather than Exception
...
fixes #7014
2014-08-27 16:03:15 +02:00
Thomas Gelf
2a204897b4
DbQuery: improve method description
...
Not English mine this was, copy paste did I ;)
2014-07-18 16:48:52 +02:00