Rename project to ObjSQLite3

FossilOrigin-Name: b821df3a30cc9a96f4d9ef2e3e35439610302312d5df3f7fd00ee69993d280ac
This commit is contained in:
Jonathan Schleifer 2020-08-31 21:33:32 +00:00
parent ac03d41ce8
commit a6a6c5b76a
12 changed files with 52 additions and 51 deletions

View file

@ -2,15 +2,15 @@ include ../extra.mk
SUBDIRS = exceptions
SHARED_LIB = ${OBJSQLITE_SHARED_LIB}
STATIC_LIB = ${OBJSQLITE_STATIC_LIB}
FRAMEWORK = ${OBJSQLITE_FRAMEWORK}
SHARED_LIB = ${OBJSQLITE3_SHARED_LIB}
STATIC_LIB = ${OBJSQLITE3_STATIC_LIB}
FRAMEWORK = ${OBJSQLITE3_FRAMEWORK}
LIB_MAJOR = 0
LIB_MINOR = 0
SRCS = SLConnection.m
SRCS = SL3Connection.m
INCLUDES := ${SRCS:.m=.h} \
ObjSQLite.h
ObjSQLite3.h
OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_A}
LIB_OBJS_EXTRA = ${EXCEPTIONS_EXCEPTIONS_LIB_A}

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2020, Jonathan Schleifer <js@nil.im>
*
* https://fossil.nil.im/objsqlite
* https://fossil.nil.im/objsqlite3
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -20,4 +20,4 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SLConnection.h"
#import "SL3Connection.h"

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2020, Jonathan Schleifer <js@nil.im>
*
* https://fossil.nil.im/objsqlite
* https://fossil.nil.im/objsqlite3
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -26,7 +26,7 @@
OF_ASSUME_NONNULL_BEGIN
@interface SLConnection: OFObject
@interface SL3Connection: OFObject
{
sqlite3 *_database;
}

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2020, Jonathan Schleifer <js@nil.im>
*
* https://fossil.nil.im/objsqlite
* https://fossil.nil.im/objsqlite3
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -20,11 +20,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SLConnection.h"
#import "SL3Connection.h"
#import "SLException.h"
#import "SL3Exception.h"
@implementation SLConnection
@implementation SL3Connection
+ (instancetype)connectionWithPath: (OFString *)path
flags: (int)flags
{
@ -42,9 +42,10 @@
flags, NULL);
if (errorCode != SQLITE_OK)
/* TODO: Use an SLException subclass. */
@throw [SLException exceptionWithConnection: nil
errorCode: errorCode];
/* TODO: Use an SL3Exception subclass. */
@throw [SL3Exception
exceptionWithConnection: nil
errorCode: errorCode];
} @catch (id e) {
[self release];
@throw e;

View file

@ -3,7 +3,7 @@ include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A}
STATIC_LIB_NOINST = ${EXCEPTIONS_A}
SRCS = SLException.m
SRCS = SL3Exception.m
INCLUDES = ${SRCS:.m=.h}

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2020, Jonathan Schleifer <js@nil.im>
*
* https://fossil.nil.im/objsqlite
* https://fossil.nil.im/objsqlite3
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -22,22 +22,22 @@
#import <ObjFW/ObjFW.h>
#import "SLConnection.h"
#import "SL3Connection.h"
OF_ASSUME_NONNULL_BEGIN
@interface SLException: OFException
@interface SL3Exception: OFException
{
SLConnection *_connection;
SL3Connection *_connection;
int _errorCode;
}
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) SLConnection *connection;
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) SL3Connection *connection;
@property (readonly, nonatomic) int errorCode;
+ (instancetype)exceptionWithConnection: (nullable SLConnection *)connection
+ (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode;
- (instancetype)initWithConnection: (nullable SLConnection *)connection
- (instancetype)initWithConnection: (nullable SL3Connection *)connection
errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER;
@end

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2020, Jonathan Schleifer <js@nil.im>
*
* https://fossil.nil.im/objsqlite
* https://fossil.nil.im/objsqlite3
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@ -20,19 +20,19 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#import "SLException.h"
#import "SL3Exception.h"
@implementation SLException
@implementation SL3Exception
@synthesize connection = _connection, errorCode = _errorCode;
+ (instancetype)exceptionWithConnection: (SLConnection *)connection
+ (instancetype)exceptionWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
return [[[self alloc] initWithConnection: connection
errorCode: errorCode] autorelease];
}
- (instancetype)initWithConnection: (SLConnection *)connection
- (instancetype)initWithConnection: (SL3Connection *)connection
errorCode: (int)errorCode
{
self = [super init];