Commit Graph

42 Commits

Author SHA1 Message Date
Johannes Meyer 43848989ae RepositoryQuery: Add method __toString() 2015-12-03 13:54:48 +01:00
Johannes Meyer acf732e760 RepositoryQuery: Add method __clone() 2015-12-03 13:54:38 +01:00
Johannes Meyer d2b8ed243f Repository: Accept parameter $filter in method requireFiltercolumn()
This allows to adjust more than the name of the column if necessary.

refs #10364
2015-11-11 16:05:54 +01:00
Johannes Meyer cf193f2c1b RepositoryQuery: Initialize property $query before requiring a new table
Since $this gets passed to Repository::requireTable() it may be possible
that some repository tries to access the underlying native query so we
need to ensure that we're able to actually provide it.

refs #10567
2015-11-11 12:48:01 +01:00
Johannes Meyer 48e6bdd6ce RepositoryQuery: Fix that the query is not passed as context in fetchAll() 2015-11-03 14:42:32 +01:00
Johannes Meyer 477af43a2f RepositoryQuery: Properly handle custom aliases when applying value conversion rules 2015-11-03 14:42:32 +01:00
Johannes Meyer 36340aafa6 Repository: Ensure that we'll internally only work with virtual table names
refs #10367
2015-10-27 13:31:47 +01:00
Johannes Meyer 59e7731efb RepositoryQuery: Implement interface FilterColumns
refs #9029
2015-08-13 14:21:39 +02:00
Johannes Meyer 7662545c2a SimpleQuery: Provide a getter for the current iterator position
refs #8615
2015-08-06 09:39:23 +02:00
Johannes Meyer 9a0e47a3e1 SimpleQuery: Add method hasResult()
refs #9632
2015-08-03 14:49:33 +02:00
Johannes Meyer 99c69cc461 SimpleQuery: Add support for peek aheads
refs #9661
2015-07-31 13:51:39 +02:00
Johannes Meyer fe41d312ca RepositoryQuery: Do not bypass the query's own iterator
refs #9661
2015-07-31 13:12:41 +02:00
Johannes Meyer 05af310e4c RepositoryQuery: Implement interface SortRules
refs #6644
2015-07-28 11:41:07 +02:00
Johannes Meyer caca219aa1 DbRepository: Consider table aliases while handling statement columns
Usually not required as there are no aliases for statements possible
but since we cannot differentiate everywhere what type of column
we're processing it is safer to always handle such.

fixes #9553
2015-07-03 13:06:10 +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 0fc8e6046c RepositoryQuery: Update sort order when converting sort rules in fetchAll 2015-06-26 15:13:31 +02:00
Johannes Meyer 0bcf7907d4 RepositoryQuery: Optimize value conversion in fetchColumn & -Pairs 2015-06-26 15:11:15 +02:00
Johannes Meyer ae21baa41e Sortable: Allow to check for a particular sort rule 2015-06-26 14:54:15 +02:00
Johannes Meyer 9055eb9cb7 RepositoryQuery: Do not sort by converted columns for limited queries
A limited query with conversion rules makes it impossible to sort
the result.
2015-06-26 14:24:03 +02:00
Johannes Meyer 4ba84903f1 Repository: Accept already resolved columns as well
If a column was aliased, one was required to use the alias when
selecting, sorting or filtering. This is now not necessary anymore
as it's now possible to use the actual column name as well.
2015-06-26 13:07:21 +02:00
Johannes Meyer ca112af9ad RepositoryQuery: Allow to ignore any default sort rules 2015-06-25 15:49:09 +02:00
Johannes Meyer beb5bd7370 Repository: Clone a filter implicitly in self::requireFilter($clone = true)
refs #8826
2015-06-01 15:03:08 +02:00
Johannes Meyer bb285db05b Differentiate the source or destination of a column when converting values
refs #8826
2015-05-29 11:32:15 +02:00
Johannes Meyer fd931e4232 RepositoryQuery: getQuery() might be called during prepareQueryColumns() 2015-05-28 14:26:48 +02:00
Johannes Meyer 647dd9d425 RepositoryQuery: Pass through the query when requiring a table or column
This allows now to adjust the query in custom repository implementations.

refs #8826
2015-05-28 13:25:26 +02:00
Johannes Meyer 237b50f953 RepositoryQuery: Ensure that we'll adjust a copy of a filter 2015-05-26 14:32:47 +02:00
Johannes Meyer fac2ebce80 RepositoryQuery: Fix handling of queries returning no results in fetchColumn()
refs #8826
2015-05-21 15:02:56 +02:00
Johannes Meyer 4833ff109c RepositoryQuery: Validate the table passed when calling from()
refs #8826
2015-05-21 15:01:13 +02:00
Johannes Meyer ba31be9695 RepositoryQuery: Disim.. Fix sort order handling
refs #8826
2015-05-21 13:52:43 +02:00
Johannes Meyer a3d5cfc28a RepositoryQuery: Properly handle queries returning no results
refs #8826
2015-05-20 09:11:46 +02:00
Johannes Meyer f305a334d5 DbConnection: Drop param $columnIndex in fetchColumn(), it's unused 2015-05-19 09:48:20 +02:00
Johannes Meyer 9af25acf38 RepositoryQuery: Benchmark when iterating a query's result
refs #8826
2015-05-18 16:02:55 +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 be36809552 RepositoryQuery: Implement interface Iterator
refs #8826
2015-05-18 14:05:02 +02:00
Johannes Meyer 3f25cf560e RepositoryQuery: Remove method paginate()
refs #8826
2015-05-18 14:03:22 +02:00
Johannes Meyer d39c697d0e Repository: QueryInterface is _not_ queryable anymore...
refs #8826
2015-05-18 14:01:17 +02:00
Johannes Meyer 053c9cdcb3 Repository: Check whether a column is queried from the correct table
refs #8826
2015-05-12 15:38:29 +02:00
Johannes Meyer 938da806ca Repository: Recurse a filter in the repository instead of in the query
This allows to recurse and adjust a filter outside the query context as well

refs #8826
2015-05-08 12:15:02 +02:00
Johannes Meyer f383ddd00a Repository: Add support for client side value conversion
refs #8826
2015-05-07 14:49:13 +02:00
Johannes Meyer f83d16acb2 RepositoryQuery: Do not lose the repository context during pagination
refs #8826
2015-05-07 14:45:47 +02:00
Johannes Meyer f9089c3e0c RepositoryQuery: Ensure compatibility with the FilterEditor widget
refs #8826
2015-05-04 15:56:58 +02:00
Johannes Meyer fa1906ee7d Introduce class Icinga\Repository\RepositoryQuery
refs #8826
2015-05-04 11:38:21 +02:00