SL3Connection: Add a convenience initializer
FossilOrigin-Name: e8a975fc72ad59a882e0110439ee9df872ca75e7276bf4c9468efc0ca303227c
This commit is contained in:
parent
b1edabd532
commit
b3c508dd48
2 changed files with 14 additions and 1 deletions
|
@ -25,6 +25,11 @@
|
|||
#import "SL3OpenFailedException.h"
|
||||
|
||||
@implementation SL3Connection
|
||||
+ (instancetype)connectionWithPath: (OFString *)path
|
||||
{
|
||||
return [[[self alloc] initWithPath: path] autorelease];
|
||||
}
|
||||
|
||||
+ (instancetype)connectionWithPath: (OFString *)path
|
||||
flags: (int)flags
|
||||
{
|
||||
|
@ -32,6 +37,12 @@
|
|||
flags: flags] autorelease];
|
||||
}
|
||||
|
||||
- (instancetype)initWithPath: (OFString *)path
|
||||
{
|
||||
return [self initWithPath: path
|
||||
flags: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE];
|
||||
}
|
||||
|
||||
- (instancetype)initWithPath: (OFString *)path
|
||||
flags: (int)flags
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue