Commit Graph

89 Commits

Author SHA1 Message Date
Johannes Meyer b82d7d7cc0 DbRepository: split() is deprecated, use explode() instead
Why php, why? :'(

refs #8826
2015-05-29 11:37:42 +02:00
Johannes Meyer 3959dc27d7 Repository: Do not return filter columns when requiring all query columns
I really wonder why I did not notice this until now...

refs #8826
2015-05-29 11:36: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 5e0ae6410b DbRepository: Consider a filter column without query context as a statement column
Feels wrong..somehow, but it works.

refs #8826
2015-05-29 08:02:12 +02:00
Johannes Meyer fd931e4232 RepositoryQuery: getQuery() might be called during prepareQueryColumns() 2015-05-28 14:26:48 +02:00
Johannes Meyer 08f8fe6f49 DbRepository: Add support for joining tables based on query/filter columns
refs #8826
2015-05-28 13:53:49 +02:00
Johannes Meyer 5326ce6bca DbRepository: Add support for table specific aliases
This was previously only possible for the base table and in case one wanted
to use table aliases in the query column definition for non-base tables as
well, it did not work well due to not being explicitly supported. Now, to use
such table aliases one must initialize DbRepository::tableAliases.

refs #8826
2015-05-28 13:44:51 +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 23b7ab0764 DbRepository: Remove COLLATE from a query column in case of a pgsql connection
refs #8826
2015-05-27 11:47:18 +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 0dda19dc7a DbRepository: Remove the table prefix when resolving statement columns
refs #8826
2015-05-20 11:50:09 +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 e9fee2dad6 Repository: Handle column name ambiguousness automatically
refs #8826
2015-05-13 13:27:08 +02:00
Johannes Meyer 7d982068a5 DbRepository: Ensure that we'll work with a instance of DbConnection
refs #8826
2015-05-13 09:52:29 +02:00
Johannes Meyer d5d0c67d2c IniRepository: Do not handle $target as a section's name
That's bullshit.

refs #8826
2015-05-13 09:48:46 +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 ca166b0175 DbRepository: Add insert, update and delete capabilities
refs #8826
2015-05-11 13:26:41 +02:00
Johannes Meyer 30bc1db6ee IniRepository: There is no need to fetch the results using a query
Icinga\Application\Config is iterable.

refs #8826
2015-05-11 07:46:36 +02:00
Johannes Meyer f1c82fc318 IniUserGroupBackend: Convert timestamps and arrays...
...to formatted datetime strings and comma separated strings respectively

refs #8826
2015-05-08 15:28:10 +02:00
Johannes Meyer 6ef4bbe210 Introduce class IniRepository
refs #8826
2015-05-08 15:22:51 +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 eac5e398be Repository: Initialize the internal column and table maps lazily as well
refs #8826
2015-05-07 09:04:50 +02:00
Johannes Meyer 99be358714 Repository: Make it possible to initialize column properties lazily
refs #8826
2015-05-07 08:28:32 +02:00
Johannes Meyer ba4330de43 Repository: We do not overwrite properties, we're initializing them
refs #8826
2015-05-07 08:03:07 +02:00
Johannes Meyer f9089c3e0c RepositoryQuery: Ensure compatibility with the FilterEditor widget
refs #8826
2015-05-04 15:56:58 +02:00
Johannes Meyer 870e75c99c Introduce class Icinga\Repository\DbRepository
refs #8826
2015-05-04 11:39:12 +02:00
Johannes Meyer fa1906ee7d Introduce class Icinga\Repository\RepositoryQuery
refs #8826
2015-05-04 11:38:21 +02:00
Johannes Meyer 3b93b84ecf Introduce class Icinga\Repository\Repository
refs #8826
2015-05-04 11:37:48 +02:00