355 Commits

Author SHA1 Message Date
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 ca5ef2da2bb9ce21701a32a668c149c0608fc8bb.
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
Johannes Meyer
84f20ecb5f Introduce interface Extensible
refs #8826
2015-05-08 15:18:28 +02:00
Johannes Meyer
16a7b010bc SimpleQuery: Ignore limit and offset when counting 2015-05-06 10:41:39 +02:00
Johannes Meyer
cfa9176192 ArrayDatasource: use array_shift in fetchRow() instead of index access
Since associative arrays are supported, the numeric index 0 might not be
the first entry in the result.
2015-05-06 10:10:29 +02:00
Johannes Meyer
7b2ed3bef7 ArrayDatasource: Create a new result when counting
There is usually no limit and offset when a query is going to be counted
so the cached result must not be used.
2015-05-06 10:08:07 +02:00
Johannes Meyer
f2ad2838f4 ArrayDatasource: Apply a query's limit and offset when creating the result 2015-05-06 09:39:43 +02:00
Johannes Meyer
d63381c002 ArrayDatasource: Add missing and fix existing documentation 2015-05-06 09:12:48 +02:00
Johannes Meyer
b1cbc1422b ArrayDatasource: Add support for associative arrays
Keys are now preserved in case a non-numeric one is found. By using
setKeyColumn() it is now also possible to map such a key to a specific
column of a row generated by createResult().
2015-05-06 08:40:02 +02:00
Johannes Meyer
5cc7f26728 ConfigObject: Extend ArrayDatasource
This makes it possible to use a ini file as repository!!!1
One thing is missing: Section names are currently ignored and should be
mapped to a virtual column.

refs #8826
2015-05-05 15:21:34 +02:00
Johannes Meyer
bd136d39f4 SimpleQuery: Make compare() alias aware
refs #8826
refs #7693
2015-05-05 07:31:50 +02:00
Johannes Meyer
d71df6a9b8 Revert "SimpleQuery: Make compare() alias aware"
This reverts commit 6612e4c1ae79c2bc3a5cd08e1594fc152107618e.
2015-05-05 07:30:42 +02:00
Johannes Meyer
6612e4c1ae SimpleQuery: Make compare() alias aware
refs #8826
refs #7693
2015-05-04 11:34:39 +02:00
Johannes Meyer
ecd059dec5 DbConnection: select() returns a DbQuery, not a Query 2015-05-04 11:13:38 +02:00
Johannes Meyer
e7789ed640 SimpleQuery: Rename unused property table' to target'
`target' is already in use, but was not declared. `table' was declared but not
used anywhere. So `table' is now `target'.
2015-05-04 11:12:43 +02:00
Johannes Meyer
ca5ef2da2b Merge Queryable into QueryInterface
A *Query*Interface describes an object as being queryable, now.

refs #8826
2015-05-04 11:07:50 +02:00
Johannes Meyer
97caeb27f7 UserBackend: Add missing and fix existing method documentation
refs #8826
2015-04-21 13:59:35 +02:00
Eric Lippmann
45d1230b28 Merge branch 'master' into bugfix/significant-whitespaces-8777 2015-04-08 10:19:53 +02:00
Eric Lippmann
6e6aabedf2 Don't trim filter expressions
Leading and trailing whitespaces may be significant for comparison.

refs #8777
2015-04-08 09:31:11 +02:00
Alexander Klimov
967a2e82dc Use (only) "@return $this" in fluent interfaces' documentation 2015-04-07 14:24:11 +02:00
Eric Lippmann
949438d753 lib: Add SimpleQuery::splitOrder() ...
... for supporting specifying the sort direction next to the column, e.g.
'service_display_name ASC'

refs #8716
2015-03-13 17:09:32 +01:00
Eric Lippmann
8563d5ed3f PHPDoc: Use @var instead of @type
Becasue of too many kittens PSR-5 backed off of deprecating @var.
So that's the way we go too.
2015-03-12 16:08:47 +01:00
Eric Lippmann
760819f239 lib: Remove TreeNode::getIterator()
Its the tree who has the iterator.

refs #6630
2015-02-10 17:01:32 +01:00
Eric Lippmann
b18405e99f lib: Add SimpleTree
Simple tree implementation for TreeNodes.

refs #6630
2015-02-10 17:00:47 +01:00
Eric Lippmann
fd38e5b2e1 lib: Use @inheritdoc in the TreeNodeIterator
refs #6630
2015-02-10 16:59:43 +01:00
Eric Lippmann
3a4c6e45b8 Fix Fatal error: Interface 'Identifiable' not found
refs #6630
2015-02-06 17:32:51 +01:00
Eric Lippmann
0d63e14baf lib: Rename Node to TreeNode
refs #6630
2015-02-06 17:27:14 +01:00
Eric Lippmann
828cb8d23a lib: Add iterator over a tree node's children
refs #6630
2015-02-06 17:23:07 +01:00
Eric Lippmann
f331c03f63 lib/tree: Save child nodes into an array instead of using SplDoublyLinkedList
refs #6630
2015-02-06 17:20:23 +01:00
Eric Lippmann
c8da05d0a7 lib: Remove NodeInterface
I'll create an iterator for nodes and drop that every node is a SplDoublyLinkedList.

refs #6630
2015-02-06 17:17:41 +01: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 338d067aba41dd6e9178cebec5433eecd614196e.
2015-02-03 16:16:26 +01:00
Eric Lippmann
338d067aba Add license header
fixes #7788
2015-02-03 15:51:04 +01:00
Eric Lippmann
52c40bdc5b lib/SimpleQuery: Increase default limit to 25
Please follow the referenced issues.

fixes #8337
refs #8339
2015-02-02 14:16:27 +01:00
Eric Lippmann
c53b1d27e9 lib: Deprecate Data\Filterable because of ...
addFilter and applyFilter do the same in all usages.
addFilter could be replaced w/ getFilter()->add().
We must no require classes implementing this interface to implement redundant methods over and over again.
The interface must be moved to the namespace Icinga\Data\Filter.
It lacks documentation.
2015-01-27 14:33:46 +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
Johannes Meyer
0c84bf614d Split config functionality into two classes
There is now Icinga\Application\Config as our ini configuration handler and
Icinga\Data\ConfigObject as our general configuration container.

refs #7147
2014-11-18 13:02:56 +01:00
Thomas Gelf
40c4562fe4 Data\SimpleQuery: don't fail on missing columns...
...for now
2014-11-16 18:24:16 +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
Thomas Gelf
e89d4642e3 Merge remote-tracking branch 'origin/master' into feature/livestatus-playground-4787 2014-11-16 10:12:34 +01:00