diff --git a/src/Makefile b/src/Makefile index 77eccfb..d678593 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,8 +8,8 @@ FRAMEWORK = ${OBJSQLITE3_FRAMEWORK} LIB_MAJOR = 0 LIB_MINOR = 0 -SRCS = SL3Connection.m \ - SL3Statement.m +SRCS = SL3Connection.m \ + SL3PreparedStatement.m INCLUDES := ${SRCS:.m=.h} \ ObjSQLite3.h diff --git a/src/ObjSQLite3.h b/src/ObjSQLite3.h index 99f2068..bfa2448 100644 --- a/src/ObjSQLite3.h +++ b/src/ObjSQLite3.h @@ -21,3 +21,4 @@ */ #import "SL3Connection.h" +#import "SL3PreparedStatement.h" diff --git a/src/SL3Statement+Private.h b/src/SL3PreparedStatement+Private.h similarity index 95% rename from src/SL3Statement+Private.h rename to src/SL3PreparedStatement+Private.h index dfdbfa2..50a0a2d 100644 --- a/src/SL3Statement+Private.h +++ b/src/SL3PreparedStatement+Private.h @@ -20,11 +20,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#import "SL3Statement.h" +#import "SL3PreparedStatement.h" OF_ASSUME_NONNULL_BEGIN -@interface SL3Statement () +@interface SL3PreparedStatement () - (instancetype)sl3_initWithConnection: (SL3Connection *)connection SQLStatement: (OFConstantString *)SQLStatement; @end diff --git a/src/SL3Statement.h b/src/SL3PreparedStatement.h similarity index 97% rename from src/SL3Statement.h rename to src/SL3PreparedStatement.h index dc82226..aede8fe 100644 --- a/src/SL3Statement.h +++ b/src/SL3PreparedStatement.h @@ -28,7 +28,7 @@ OF_ASSUME_NONNULL_BEGIN @class SL3Connection; -@interface SL3Statement: OFObject +@interface SL3PreparedStatement: OFObject { #ifdef SL3_PUBLIC_IVARS @public diff --git a/src/SL3Statement.m b/src/SL3PreparedStatement.m similarity index 96% rename from src/SL3Statement.m rename to src/SL3PreparedStatement.m index 3eb8d0d..e7683cb 100644 --- a/src/SL3Statement.m +++ b/src/SL3PreparedStatement.m @@ -20,8 +20,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#import "SL3Statement.h" -#import "SL3Statement+Private.h" +#import "SL3PreparedStatement.h" +#import "SL3PreparedStatement+Private.h" #import "SL3BindObjectFailedException.h" #import "SL3ClearBindingsFailedException.h" @@ -35,7 +35,7 @@ releaseObject(void *object) [(id)object release]; } -@implementation SL3Statement +@implementation SL3PreparedStatement - (instancetype)sl3_initWithConnection: (SL3Connection *)connection SQLStatement: (OFConstantString *)SQLStatement { @@ -70,7 +70,7 @@ releaseObject(void *object) } static void -bindObject(SL3Statement *statement, int column, id object) +bindObject(SL3PreparedStatement *statement, int column, id object) { int code; diff --git a/src/exceptions/SL3BindObjectFailedException.h b/src/exceptions/SL3BindObjectFailedException.h index e07f1ab..a6703ab 100644 --- a/src/exceptions/SL3BindObjectFailedException.h +++ b/src/exceptions/SL3BindObjectFailedException.h @@ -22,7 +22,7 @@ #import "SL3Exception.h" -#import "SL3Statement.h" +#import "SL3PreparedStatement.h" OF_ASSUME_NONNULL_BEGIN @@ -30,24 +30,24 @@ OF_ASSUME_NONNULL_BEGIN { id _object; int _column; - SL3Statement *_statement; + SL3PreparedStatement *_statement; } @property (readonly, nonatomic) id object; @property (readonly, nonatomic) int column; -@property (readonly, nonatomic) SL3Statement *statement; +@property (readonly, nonatomic) SL3PreparedStatement *statement; + (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; + (instancetype)exceptionWithObject: (id)object column: (int)column - statement: (SL3Statement *)statement + statement: (SL3PreparedStatement *)statement errorCode: (int)errorCode; - (instancetype)initWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; - (instancetype)initWithObject: (id)object column: (int)column - statement: (SL3Statement *)statement + statement: (SL3PreparedStatement *)statement errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER; @end diff --git a/src/exceptions/SL3BindObjectFailedException.m b/src/exceptions/SL3BindObjectFailedException.m index 38316ec..8768608 100644 --- a/src/exceptions/SL3BindObjectFailedException.m +++ b/src/exceptions/SL3BindObjectFailedException.m @@ -33,7 +33,7 @@ + (instancetype)exceptionWithObject: (id)object column: (int)column - statement: (SL3Statement *)statement + statement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { return [[[self alloc] initWithObject: object @@ -50,7 +50,7 @@ - (instancetype)initWithObject: (id)object column: (int)column - statement: (SL3Statement *)statement + statement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { self = [super initWithConnection: statement->_connection diff --git a/src/exceptions/SL3ClearBindingsFailedException.h b/src/exceptions/SL3ClearBindingsFailedException.h index 17798aa..dd9c3f1 100644 --- a/src/exceptions/SL3ClearBindingsFailedException.h +++ b/src/exceptions/SL3ClearBindingsFailedException.h @@ -22,24 +22,24 @@ #import "SL3Exception.h" -#import "SL3Statement.h" +#import "SL3PreparedStatement.h" OF_ASSUME_NONNULL_BEGIN @interface SL3ClearBindingsFailedException: SL3Exception { - SL3Statement *_statement; + SL3PreparedStatement *_statement; } -@property (readonly, nonatomic) SL3Statement *statement; +@property (readonly, nonatomic) SL3PreparedStatement *statement; + (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; -+ (instancetype)exceptionWithStatement: (SL3Statement *)statement ++ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode; - (instancetype)initWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; -- (instancetype)initWithStatement: (SL3Statement *)statement +- (instancetype)initWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER; @end diff --git a/src/exceptions/SL3ClearBindingsFailedException.m b/src/exceptions/SL3ClearBindingsFailedException.m index c73eb44..3c2588b 100644 --- a/src/exceptions/SL3ClearBindingsFailedException.m +++ b/src/exceptions/SL3ClearBindingsFailedException.m @@ -31,7 +31,7 @@ OF_UNRECOGNIZED_SELECTOR } -+ (instancetype)exceptionWithStatement: (SL3Statement *)statement ++ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { return [[[self alloc] initWithStatement: statement @@ -44,7 +44,7 @@ OF_INVALID_INIT_METHOD } -- (instancetype)initWithStatement: (SL3Statement *)statement +- (instancetype)initWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { self = [super initWithConnection: statement->_connection diff --git a/src/exceptions/SL3ExecuteStatementFailedException.h b/src/exceptions/SL3ExecuteStatementFailedException.h index 69d38ae..ab86d37 100644 --- a/src/exceptions/SL3ExecuteStatementFailedException.h +++ b/src/exceptions/SL3ExecuteStatementFailedException.h @@ -22,24 +22,24 @@ #import "SL3Exception.h" -#import "SL3Statement.h" +#import "SL3PreparedStatement.h" OF_ASSUME_NONNULL_BEGIN @interface SL3ExecuteStatementFailedException: SL3Exception { - SL3Statement *_statement; + SL3PreparedStatement *_statement; } -@property (readonly, nonatomic) SL3Statement *statement; +@property (readonly, nonatomic) SL3PreparedStatement *statement; + (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; -+ (instancetype)exceptionWithStatement: (SL3Statement *)statement ++ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode; - (instancetype)initWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; -- (instancetype)initWithStatement: (SL3Statement *)statement +- (instancetype)initWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER; @end diff --git a/src/exceptions/SL3ExecuteStatementFailedException.m b/src/exceptions/SL3ExecuteStatementFailedException.m index 107b0f3..df15a91 100644 --- a/src/exceptions/SL3ExecuteStatementFailedException.m +++ b/src/exceptions/SL3ExecuteStatementFailedException.m @@ -31,7 +31,7 @@ OF_UNRECOGNIZED_SELECTOR } -+ (instancetype)exceptionWithStatement: (SL3Statement *)statement ++ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { return [[[self alloc] initWithStatement: statement @@ -44,7 +44,7 @@ OF_INVALID_INIT_METHOD } -- (instancetype)initWithStatement: (SL3Statement *)statement +- (instancetype)initWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { self = [super initWithConnection: statement->_connection diff --git a/src/exceptions/SL3ResetStatementFailedException.h b/src/exceptions/SL3ResetStatementFailedException.h index 5a4808d..d96cf4e 100644 --- a/src/exceptions/SL3ResetStatementFailedException.h +++ b/src/exceptions/SL3ResetStatementFailedException.h @@ -22,24 +22,24 @@ #import "SL3Exception.h" -#import "SL3Statement.h" +#import "SL3PreparedStatement.h" OF_ASSUME_NONNULL_BEGIN @interface SL3ResetStatementFailedException: SL3Exception { - SL3Statement *_statement; + SL3PreparedStatement *_statement; } -@property (readonly, nonatomic) SL3Statement *statement; +@property (readonly, nonatomic) SL3PreparedStatement *statement; + (instancetype)exceptionWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; -+ (instancetype)exceptionWithStatement: (SL3Statement *)statement ++ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode; - (instancetype)initWithConnection: (nullable SL3Connection *)connection errorCode: (int)errorCode OF_UNAVAILABLE; -- (instancetype)initWithStatement: (SL3Statement *)statement +- (instancetype)initWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode OF_DESIGNATED_INITIALIZER; @end diff --git a/src/exceptions/SL3ResetStatementFailedException.m b/src/exceptions/SL3ResetStatementFailedException.m index fe4592b..67b158b 100644 --- a/src/exceptions/SL3ResetStatementFailedException.m +++ b/src/exceptions/SL3ResetStatementFailedException.m @@ -31,7 +31,7 @@ OF_UNRECOGNIZED_SELECTOR } -+ (instancetype)exceptionWithStatement: (SL3Statement *)statement ++ (instancetype)exceptionWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { return [[[self alloc] initWithStatement: statement @@ -44,7 +44,7 @@ OF_INVALID_INIT_METHOD } -- (instancetype)initWithStatement: (SL3Statement *)statement +- (instancetype)initWithStatement: (SL3PreparedStatement *)statement errorCode: (int)errorCode { self = [super initWithConnection: statement->_connection