GPKGSqliteConnection
Objective-C
@interface GPKGSqliteConnection : NSObject
Swift
class GPKGSqliteConnection : NSObject
Single sqlite3 connection to a database file opened as part of a connection pool
-
Reusable connection flag
Declaration
Objective-C
@property (nonatomic) BOOL reusable;
Swift
var reusable: Bool { get set }
-
Initialize
Declaration
Objective-C
- (instancetype)initWithId:(int)connectionId andConnection:(sqlite3 *)connection andPool:(GPKGConnectionPool *)connectionPool andStackTrace:(BOOL)stackTrace;
Swift
init!(id connectionId: Int32, andConnection connection: OpaquePointer!, andPool connectionPool: GPKGConnectionPool!, andStackTrace stackTrace: Bool)
Parameters
connectionId
connection id
connection
sqlite connection
connectionPool
connection pool
stackTrace
true to maintain stack traces of thread owner
Return Value
new sql connection
-
Get the connection id
Declaration
Objective-C
- (NSNumber *)connectionId;
Swift
func connectionId() -> NSNumber!
Return Value
connection id
-
Get the connection
Declaration
Objective-C
- (sqlite3 *)connection;
Swift
func connection() -> OpaquePointer!
Return Value
connection
-
Release the connection back to the connection pool
Declaration
Objective-C
- (void)releaseConnection;
Swift
func releaseConnection()
-
Update the check out attributes using the current thread as the new owner
Declaration
Objective-C
- (void)checkOut;
Swift
func checkOut()
-
Clear the check out features upon check in
Declaration
Objective-C
- (void)checkIn;
Swift
func checkIn()
-
Get the stack trace of when the owning thread checked out the connection.
Declaration
Objective-C
- (NSArray *)stackTrace;
Swift
func stackTrace() -> [Any]!
Return Value
stack trace, nil when not checked out or not maintaining stack traces
-
Get the date this connection was checked out
Declaration
Objective-C
- (NSDate *)dateCheckedOut;
Swift
func dateCheckedOut() -> Date!
Return Value
date of checkout, nil if not checked out
-
Determine if this connection is releasable
Declaration
Objective-C
- (BOOL)isReleasable;
Swift
func isReleasable() -> Bool
Return Value
true if releasable