Commit Graph

102 Commits

Author SHA1 Message Date
Eric Lippmann 771efae1a2 lib/db: Allow to configure mssql resources
refs #9683
2015-09-07 16:20:37 +02:00
Eric Lippmann 4763b6b20a lib/db: Allow to configure persistent connections
refs #9683
2015-09-07 16:15:04 +02:00
Eric Lippmann 44c19fc5e6 lib/db: Allow to create oracle (pdo_oci) connections
refs #9683
2015-09-07 16:14:11 +02:00
Eric Lippmann a42c8d1f24 lib/db: Allow to create oci8 connections
refs #9683
2015-09-07 16:11:16 +02:00
Eric Lippmann e34c50bc91 lib: Fix PHPDoc of DbConnection::$dbAdapter 2015-09-07 14:43:13 +02:00
Eric Lippmann cf917b59f8 lib: Fix PHPDoc of DbConnection::getDbApdater() 2015-09-03 16:20:29 +02: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
Matthias Jentsch f4054d575b Add Inspection API to db connection
refs #9641
2015-07-16 15:29:45 +02:00
Johannes Meyer 9595809dfa SimpleQuery: Deep clone the filter when cloning the query 2015-06-24 14:33:11 +02:00
Johannes Meyer 6d48de6cf5 DbConnection: Do not accept configuration for table prefixes
fixes #9418
2015-06-22 13:32:34 +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
Johannes Meyer 54354b17bf DbConnection: Replicate the fix for #9211 2015-05-26 09:26:55 +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 093857641a DbConnection: Cast a queries count to integer forcefully 2015-05-20 09:30:23 +02:00
Johannes Meyer f305a334d5 DbConnection: Drop param $columnIndex in fetchColumn(), it's unused 2015-05-19 09:48:20 +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
Johannes Meyer 0e0341f78a It's the connection which provides a cursor, not the query 2015-05-18 16:01:58 +02:00
Johannes Meyer 7d08dd2765 DbConnection: Adjust insert and update to support custom type definitions
This strips the custom insert and update implementataions in
DbUserBackend down so that it does not need to do such low level stuff...

refs #8826
2015-05-13 09:15:18 +02:00
Johannes Meyer 3aaa6d39a1 DbConnection: Make it possible to insert, update and delete table rows
refs #8826
2015-05-11 13:25:50 +02:00
Johannes Meyer ecd059dec5 DbConnection: select() returns a DbQuery, not a Query 2015-05-04 11:13:38 +02:00
Alexander Klimov 967a2e82dc Use (only) "@return $this" in fluent interfaces' documentation 2015-04-07 14:24:11 +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
Johannes Meyer 7621f6642d Adjust usages of Icinga\Application\Config
refs #7147
2014-11-18 13:11:52 +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
Thomas Gelf 0d4d4930a9 Db\DbConnection: benchmark single row fetches 2014-11-11 21:07:02 +01:00
Johannes Meyer 7b99b74ae1 Prefer Icinga\Application\Config instead of Zend_Config
refs #7147
2014-11-07 13:53:03 +01:00
Eric Lippmann 2b67683e00 DbConnection::__construct(): Set prefix if configured 2014-10-20 13:43:03 +02: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