ObjSQLite3  Check-in [e8a975fc72]

Overview
Comment:SL3Connection: Add a convenience initializer
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e8a975fc72ad59a882e0110439ee9df872ca75e7276bf4c9468efc0ca303227c
User & Date: js on 2020-10-01 21:21:50
Other Links: manifest | tags
Context
2020-10-01
21:26
SL3Connection: Add a way to prepare statements check-in: c64a1aa6fa user: js tags: trunk
21:21
SL3Connection: Add a convenience initializer check-in: e8a975fc72 user: js tags: trunk
21:16
Rename SL3Statement -> SL3PreparedStatement check-in: 4fc7a99ac9 user: js tags: trunk
Changes

Modified src/SL3Connection.h from [d84285d3b9] to [deb912bc60].

30
31
32
33
34
35
36

37
38

39
40

41
42
43
30
31
32
33
34
35
36
37
38
39
40
41

42
43
44
45







+


+

-
+



{
#ifdef SL3_PUBLIC_IVARS
@public
#endif
	sqlite3 *_db;
}

+ (instancetype)connectionWithPath: (OFString *)path;
+ (instancetype)connectionWithPath: (OFString *)path
			     flags: (int)flags;
- (instancetype)initWithPath: (OFString *)path;
- (instancetype)initWithPath: (OFString *)path
		       flags: (int)flags;
		       flags: (int)flags OF_DESIGNATED_INITIALIZER;
@end

OF_ASSUME_NONNULL_END

Modified src/SL3Connection.m from [32a5efa225] to [5dc8aa23b7].

21
22
23
24
25
26
27





28
29
30
31
32
33






34
35
36
37
38
39
40
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







+
+
+
+
+






+
+
+
+
+
+







 */

#import "SL3Connection.h"

#import "SL3OpenFailedException.h"

@implementation SL3Connection
+ (instancetype)connectionWithPath: (OFString *)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}

+ (instancetype)connectionWithPath: (OFString *)path
			     flags: (int)flags
{
	return [[[self alloc] initWithPath: path
				     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
{
	self = [super init];

	@try {