Overview
Comment: |
Downloads: |
Tarball
| ZIP archive
| SQL archive |
Timelines: |
family
| ancestors
| descendants
| both
| trunk
|
Files: |
files
| file ages
| folders
|
SHA3-256: |
4fc7a99ac98531e4bc6252a53c4a08277e32c62c01fa7593c1d0f24001d974fe |
User & Date: |
js
2020-10-01 21:16:18 |
Context
2020-10-01
| | |
21:21 |
|
check-in: e8a975fc72 user: js tags: trunk
|
21:16 |
|
check-in: 4fc7a99ac9 user: js tags: trunk
|
21:09 |
|
check-in: 7c61fcfb1e user: js tags: trunk
|
| | |
Changes
Changes to src/Makefile.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
include ../extra.mk
SUBDIRS = exceptions
SHARED_LIB = ${OBJSQLITE3_SHARED_LIB}
STATIC_LIB = ${OBJSQLITE3_STATIC_LIB}
FRAMEWORK = ${OBJSQLITE3_FRAMEWORK}
LIB_MAJOR = 0
LIB_MINOR = 0
SRCS = SL3Connection.m \
SL3Statement.m
INCLUDES := ${SRCS:.m=.h} \
ObjSQLite3.h
OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_A}
LIB_OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_LIB_A}
include ../buildsys.mk
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
include ../extra.mk
SUBDIRS = exceptions
SHARED_LIB = ${OBJSQLITE3_SHARED_LIB}
STATIC_LIB = ${OBJSQLITE3_STATIC_LIB}
FRAMEWORK = ${OBJSQLITE3_FRAMEWORK}
LIB_MAJOR = 0
LIB_MINOR = 0
SRCS = SL3Connection.m \
SL3PreparedStatement.m
INCLUDES := ${SRCS:.m=.h} \
ObjSQLite3.h
OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_A}
LIB_OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_LIB_A}
include ../buildsys.mk
|
︙ | | | ︙ | |
Changes to src/ObjSQLite3.h.
︙ | | | ︙ | |
17
18
19
20
21
22
23
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Connection.h"
|
>
|
17
18
19
20
21
22
23
24
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Connection.h"
#import "SL3PreparedStatement.h"
|
Name change from src/SL3Statement+Private.h to src/SL3PreparedStatement+Private.h.
︙ | | | ︙ | |
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Statement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3Statement ()
- (instancetype)sl3_initWithConnection: (SL3Connection *)connection
SQLStatement: (OFConstantString *)SQLStatement;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3PreparedStatement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3PreparedStatement ()
- (instancetype)sl3_initWithConnection: (SL3Connection *)connection
SQLStatement: (OFConstantString *)SQLStatement;
@end
OF_ASSUME_NONNULL_END
|
Name change from src/SL3Statement.h to src/SL3PreparedStatement.h.
︙ | | | ︙ | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <sqlite3.h>
OF_ASSUME_NONNULL_BEGIN
@class SL3Connection;
@interface SL3Statement: OFObject
{
#ifdef SL3_PUBLIC_IVARS
@public
#endif
SL3Connection *_connection;
sqlite3_stmt *_stmt;
}
|
|
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <sqlite3.h>
OF_ASSUME_NONNULL_BEGIN
@class SL3Connection;
@interface SL3PreparedStatement: OFObject
{
#ifdef SL3_PUBLIC_IVARS
@public
#endif
SL3Connection *_connection;
sqlite3_stmt *_stmt;
}
|
︙ | | | ︙ | |
Name change from src/SL3Statement.m to src/SL3PreparedStatement.m.
︙ | | | ︙ | |
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
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Statement.h"
#import "SL3Statement+Private.h"
#import "SL3BindObjectFailedException.h"
#import "SL3ClearBindingsFailedException.h"
#import "SL3ExecuteStatementFailedException.h"
#import "SL3PrepareStatementFailedException.h"
#import "SL3ResetStatementFailedException.h"
static void
releaseObject(void *object)
{
[(id)object release];
}
@implementation SL3Statement
- (instancetype)sl3_initWithConnection: (SL3Connection *)connection
SQLStatement: (OFConstantString *)SQLStatement
{
self = [super init];
@try {
int code = sqlite3_prepare_v2(connection->_db,
|
|
|
|
|
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
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3PreparedStatement.h"
#import "SL3PreparedStatement+Private.h"
#import "SL3BindObjectFailedException.h"
#import "SL3ClearBindingsFailedException.h"
#import "SL3ExecuteStatementFailedException.h"
#import "SL3PrepareStatementFailedException.h"
#import "SL3ResetStatementFailedException.h"
static void
releaseObject(void *object)
{
[(id)object release];
}
@implementation SL3PreparedStatement
- (instancetype)sl3_initWithConnection: (SL3Connection *)connection
SQLStatement: (OFConstantString *)SQLStatement
{
self = [super init];
@try {
int code = sqlite3_prepare_v2(connection->_db,
|
︙ | | | ︙ | |
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
sqlite3_finalize(_stmt);
[_connection release];
[super dealloc];
}
static void
bindObject(SL3Statement *statement, int column, id object)
{
int code;
if ([object isKindOfClass: [OFNumber class]]) {
switch (*[object objCType]) {
case 'f':
case 'd':
|
|
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
sqlite3_finalize(_stmt);
[_connection release];
[super dealloc];
}
static void
bindObject(SL3PreparedStatement *statement, int column, id object)
{
int code;
if ([object isKindOfClass: [OFNumber class]]) {
switch (*[object objCType]) {
case 'f':
case 'd':
|
︙ | | | ︙ | |
Changes to src/exceptions/SL3BindObjectFailedException.h.
︙ | | | ︙ | |
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3Statement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3BindObjectFailedException: SL3Exception
{
id _object;
int _column;
SL3Statement *_statement;
}
@property (readonly, nonatomic) id object;
@property (readonly, nonatomic) int column;
@property (readonly, nonatomic) SL3Statement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithObject: (id)object
column: (int)column
statement: (SL3Statement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithObject: (id)object
column: (int)column
statement: (SL3Statement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
|
|
|
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3PreparedStatement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3BindObjectFailedException: SL3Exception
{
id _object;
int _column;
SL3PreparedStatement *_statement;
}
@property (readonly, nonatomic) id object;
@property (readonly, nonatomic) int column;
@property (readonly, nonatomic) SL3PreparedStatement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithObject: (id)object
column: (int)column
statement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithObject: (id)object
column: (int)column
statement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/SL3BindObjectFailedException.m.
︙ | | | ︙ | |
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
|
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithObject: (id)object
column: (int)column
statement: (SL3Statement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithObject: object
column: column
statement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithObject: (id)object
column: (int)column
statement: (SL3Statement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_object = [object retain];
|
|
|
|
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
|
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithObject: (id)object
column: (int)column
statement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithObject: object
column: column
statement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithObject: (id)object
column: (int)column
statement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_object = [object retain];
|
︙ | | | ︙ | |
Changes to src/exceptions/SL3ClearBindingsFailedException.h.
︙ | | | ︙ | |
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3Statement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3ClearBindingsFailedException: SL3Exception
{
SL3Statement *_statement;
}
@property (readonly, nonatomic) SL3Statement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
|
|
|
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3PreparedStatement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3ClearBindingsFailedException: SL3Exception
{
SL3PreparedStatement *_statement;
}
@property (readonly, nonatomic) SL3PreparedStatement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/SL3ClearBindingsFailedException.m.
︙ | | | ︙ | |
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
|
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithStatement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_statement = [statement retain];
|
|
|
|
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
|
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithStatement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_statement = [statement retain];
|
︙ | | | ︙ | |
Changes to src/exceptions/SL3ExecuteStatementFailedException.h.
︙ | | | ︙ | |
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3Statement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3ExecuteStatementFailedException: SL3Exception
{
SL3Statement *_statement;
}
@property (readonly, nonatomic) SL3Statement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
|
|
|
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3PreparedStatement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3ExecuteStatementFailedException: SL3Exception
{
SL3PreparedStatement *_statement;
}
@property (readonly, nonatomic) SL3PreparedStatement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/SL3ExecuteStatementFailedException.m.
︙ | | | ︙ | |
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
|
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithStatement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_statement = [statement retain];
|
|
|
|
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
|
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithStatement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_statement = [statement retain];
|
︙ | | | ︙ | |
Changes to src/exceptions/SL3ResetStatementFailedException.h.
︙ | | | ︙ | |
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3Statement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3ResetStatementFailedException: SL3Exception
{
SL3Statement *_statement;
}
@property (readonly, nonatomic) SL3Statement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
|
|
|
|
|
|
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
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SL3Exception.h"
#import "SL3PreparedStatement.h"
OF_ASSUME_NONNULL_BEGIN
@interface SL3ResetStatementFailedException: SL3Exception
{
SL3PreparedStatement *_statement;
}
@property (readonly, nonatomic) SL3PreparedStatement *statement;
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
+ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_UNAVAILABLE;
- (instancetype)initWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Changes to src/exceptions/SL3ResetStatementFailedException.m.
︙ | | | ︙ | |
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
|
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithStatement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithStatement: (SL3Statement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_statement = [statement retain];
|
|
|
|
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
|
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_UNRECOGNIZED_SELECTOR
}
+ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
return [[[self alloc] initWithStatement: statement
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithStatement: (SL3PreparedStatement *)statement
errorCode: (int)errorCode
{
self = [super initWithConnection: statement->_connection
errorCode: errorCode];
@try {
_statement = [statement retain];
|
︙ | | | ︙ | |