Commits

Author Commit Message Labels Comments Date
Thomas Waldmann
added sqlalchemy store
Thomas Waldmann
remove memcached store - does not support iteration over keys, non-persistent (we can us it as cache, but not as store)
Thomas Waldmann
protecting middleware: use constants for ACL rights
Thomas Waldmann
add constants for ACL rights
Thomas Waldmann
we don't need an extract backend for Trash/*, just complicates stuff and is rather pointless copied from etherpad: i just thought about renaming items, router, trash, etc. the first idea was that a rename (saving a latest revision with different name than revs before) could potentially move the whole item (all revs) to another backend. e.g. if one renames Foo to Trash/Foo and Trash is routed to another backend. but then i noticed that we do not need to do that. we can just store only …
Thomas Waldmann
no need for ProtectedItem proxy to allow write access to .itemid
Thomas Waldmann
require read access for iter_revs
Thomas Waldmann
protecting middleware: more tests, refactored tests
Thomas Waldmann
move ACL checks to protecting middleware
Thomas Waldmann
some indexing middleware methods now yield Revisions (not revids - use rev.revid if you need that) I tried to optimize Revision and Meta class by reusing information we already have: e.g. if we already did a index lookup before creating a related revision, we can give the whoosh doc to Revision.__init__ so it does not access the index again. It is also given to Meta.__init__ there, so it does not need to load metadata from the store if you are just requesting some meta key/value that is also i…
Thomas Waldmann
added some convenience functions to create backend mappings to storage package create_simple_mapping('stores:fs:/some/path') creates a ns_mapping added .from_uri(uri) class methods to build backends and stores from URIs added dynamic loading of backend and store modules
Thomas Waldmann
add env-pypy to .hgignore
Thomas Waldmann
move most docs from README.txt to package/module docstrings
Thomas Waldmann
move all under the storage package, fix imports
Thomas Waldmann
use relative imports (with ./..)
Thomas Waldmann
fix import to use 'backends'
Thomas Waldmann
renamed backend package to backends
Thomas Waldmann
fix imports and docs to use 'store(s)' not 'storage(s)'
Thomas Waldmann
just rename storage package to stores
Thomas Waldmann
rename router>routing, serializer>serialization
Thomas Waldmann
lots of cosmetic changes, details see below PEP8 related changes improved docstrings, comments use string constants for meta keys remove unused code
Thomas Waldmann
backend: .store() now checks size and hash declared in meta (if present)
Thomas Waldmann
return 'index changed' status from index update method
Thomas Waldmann
indexing middleware: change create_item/existing item to use **query, add get_item with **query
Thomas Waldmann
indexing: search*/document? method must use the ITEMID when constructing the Item instance (not the name) otherwise it might use a wrong item's ACL (or access a non-existing item) if renames happen and you want to access a non-current revision. i generalized Item.__init__ to take any "query" as kwargs, could be itemid=... or name=... depending on what one wants.
Thomas Waldmann
indexing: if we have the latest-revs index doc already, give it to Item.__init__ and do not fetch it there again change Item.__init__ arg "item_name" to "name" so it is in sync with the index field name removed problematic .pop(CONTENT) as other code relied on getting the full index document
Thomas Waldmann
indexing: improve some comments / docstrings
Thomas Waldmann
simplify create/clear_revision: it is all just store_revision with the meta and data you want for overwriting existing revisions, we need to be careful. the code currently requires overwrite=True for this. fixed acl checking: write = be able to add new revisions to existing items (items with >= 1 revision) create = be able to create new items (create the 1st revision of an item) overwrite = be able to overwrite existing revisions in-place
Thomas Waldmann
indexing tests: add mtime meta at another place where it is needed now
Thomas Waldmann
indexing: fix indexing when a latest revision is destroyed, fix indexing tests also removed one of the _find_latest_revids implementations, we need the one using search(), so we can determine the latest revision of a single, specific item also.
  1. Prev
  2. Next