Commit Graph

247 Commits

Author SHA1 Message Date
Johannes Meyer 99c69cc461 SimpleQuery: Add support for peek aheads
refs #9661
2015-07-31 13:51:39 +02:00
Johannes Meyer 16e54d3987 DbQuery: Be less error-prone while calling array_search 2015-07-31 11:05:23 +02:00
Eric Lippmann 9060e8a034 lib: Only call Icinga::app()->getRequest() for getting the request outside of a controller
Saves a call to getFrontController().

refs #9660
2015-07-30 14:02:44 +02:00
Johannes Meyer cdc2182430 Introduce interface SortRules
refs #6644
2015-07-28 11:40:27 +02:00
Matthias Jentsch a14da1c558 Make sure to log inspection messages into message log too
refs #9641
2015-07-27 09:44:07 +02:00
Thomas Gelf 727a2d7141 Paginator: relax requirements to Paginatable
* we need no full query interface here
* introduced new interface "Paginatable"

fixes #9483
2015-07-23 13:48:49 +02:00
Matthias Jentsch f4054d575b Add Inspection API to db connection
refs #9641
2015-07-16 15:29:45 +02:00
Matthias Jentsch 6b8e5da76d Move all assertion functions into the inspect functions
Reduce code duplication and add class Inspection

refs #9630
2015-07-16 12:21:11 +02:00
Matthias Jentsch 276aa43aa2 Upgrdae Inspection API again
Do not use InspectionException any more to reduce complexity of nested inspections, but keep error states
in the Inspection object itself.

refs #9630
2015-07-15 18:39:09 +02:00
Matthias Jentsch 6762ef053e Upgrade Inspection API
Reduce code duplication and stateffullnes by using InspectionException to indicate that an error was thrown, and only using one inspect function.

refs #9630
2015-07-15 17:51:18 +02:00
Matthias Jentsch 6599940e6c Introduce Interface for inspecting ldap connections
refs #9605
2015-07-14 12:30:16 +02:00
Johannes Meyer cfd43f251e Revert "Sortable: Allow to check for a particular sort rule"
This reverts commit ae21baa41e.
2015-06-26 15:13:46 +02:00
Johannes Meyer ae21baa41e Sortable: Allow to check for a particular sort rule 2015-06-26 14:54:15 +02:00
Johannes Meyer 56c506c8af SimpleQuery: Do not report to have a limit if there is none 2015-06-26 14:21:09 +02:00
Johannes Meyer 98b01207cf Show intersecting ok-states as well in the default servicegrid view
fixes #9360
2015-06-24 14:37:07 +02:00
Johannes Meyer 9595809dfa SimpleQuery: Deep clone the filter when cloning the query 2015-06-24 14:33:11 +02:00
Johannes Meyer c3ad7b211a Ldap\Connection: Rename to LdapConnection
refs #8954
2015-06-24 09:05:29 +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 fb9641fb3c Controller: Validate restriction columns 2015-06-18 16:43:20 +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 28a28a89d3 Merge branch 'master' into feature/user-and-group-management-8826
Conflicts:
	library/Icinga/Data/SimpleQuery.php
2015-06-02 14:54:13 +02:00
Johannes Meyer 06fb6ff6fc SimpleQuery: Re-add method paginate but flag it as deprecated 2015-06-02 14:47:29 +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 fb07f0b94c Merge branch 'master' into feature/user-and-group-management-8826
Conflicts:
	library/Icinga/Authentication/Backend/LdapUserBackend.php
	library/Icinga/Protocol/Ldap/Query.php
2015-05-19 14:14:03 +02:00
Johannes Meyer f305a334d5 DbConnection: Drop param $columnIndex in fetchColumn(), it's unused 2015-05-19 09:48:20 +02:00
Johannes Meyer cf989a0f7f SimpleQuery: Implement interface Iterator to benchmark result iteration 2015-05-19 09:41:55 +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 742dfcaf41 Revert "Fetchable: Add method fetch() which returns an iterator"
This reverts commit 7a6837de0e.
2015-05-18 15:17:22 +02:00
Johannes Meyer 7a6837de0e Fetchable: Add method fetch() which returns an iterator 2015-05-18 13:59:16 +02:00
Eric Lippmann 82ee1d6e60 Merge branch 'master' into bugfix/significant-whitespaces-8777
Conflicts:
	library/Icinga/Web/Widget/FilterEditor.php
2015-05-18 13:35:28 +02:00
Johannes Meyer 524c449649 Merge branch 'master' into feature/user-and-group-management-8826 2015-05-18 11:28:07 +02:00
Johannes Meyer 130fea3146 Revert "Merge Queryable into QueryInterface"
This reverts commit ca5ef2da2b.
A perfect example of a change as a result of being mentally deranged.
2015-05-18 11:25:02 +02:00
Johannes Meyer fbf0ad4339 Drop interface Browsable
We're not required to handle objects of Zend_Paginator in any way, so
creating such as part of a query is not necessary since QueryAdapter
accepts any instance of QueryInterface. (gets enforced in the near future)

refs #8339
2015-05-15 14:37:41 +02:00
Johannes Meyer ed5f646b6f SimpleQuery: Implement interface IteratorAggregate
I'd like to foreach such.
2015-05-15 14:37:41 +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 8690056e1c Introduce interface Updatable
refs #8826
2015-05-08 15:18:56 +02:00
Johannes Meyer 2c1fac9da8 Introduce interface Reducible
refs #8826
2015-05-08 15:18:42 +02:00