This repository was archived by the owner on Jul 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCOSQLiteStorePersistentRootBackingStore.h
More file actions
66 lines (51 loc) · 1.7 KB
/
COSQLiteStorePersistentRootBackingStore.h
File metadata and controls
66 lines (51 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#import <Foundation/Foundation.h>
#import "COItemGraph.h"
@class FMDatabase;
@class COItemGraph;
@class CORevisionInfo;
@class CORevisionID;
/**
* Database connection for manipulating a persistent root backing store.
*
* Not a public class, only intended to be used by COSQLiteStore.
*/
@interface COSQLiteStorePersistentRootBackingStore : NSObject
{
NSString *path_;
FMDatabase *db_;
}
/**
* @param
* aPath the pathn of a directory where the backing store
* should be opened or created.
*/
- (id)initWithPath: (NSString *)aPath;
- (BOOL)close;
- (BOOL) beginTransaction;
- (BOOL) commit;
- (CORevisionInfo *) revisionForID: (CORevisionID *)aToken;
- (COItemGraph *) itemTreeForRevid: (int64_t)revid;
- (COItemGraph *) itemTreeForRevid: (int64_t)revid restrictToItemUUIDs: (NSSet *)itemSet;
/**
* baseRevid must be < finalRevid.
* returns nil if baseRevid or finalRevid are not valid revisions.
*/
- (COItemGraph *) partialItemTreeFromRevid: (int64_t)baseRevid toRevid: (int64_t)finalRevid;
- (COItemGraph *) partialItemTreeFromRevid: (int64_t)baseRevid
toRevid: (int64_t)revid
restrictToItemUUIDs: (NSSet *)itemSet;
/**
*
* @returns 0 for the first commit on an empty backing store
*/
- (int64_t) writeItemTree: (COItemGraph *)anItemTree
withMetadata: (NSDictionary *)metadata
withParent: (int64_t)aParent
modifiedItems: (NSArray*)modifiedItems; // array of COUUID
- (NSIndexSet *) revidsFromRevid: (int64_t)baseRevid toRevid: (int64_t)finalRevid;
/**
* Unconditionally deletes the specified revisions
*/
- (BOOL) deleteRevids: (NSIndexSet *)revids;
- (NSIndexSet *) revidsUsedRange;
@end