diff --git a/SQLClient.h b/SQLClient.h index 6a3bd4f..1aeed95 100644 --- a/SQLClient.h +++ b/SQLClient.h @@ -490,7 +490,7 @@ SQLCLIENT_PRIVATE * or -cache:simpleQuery:recordType:listType: methods. *

*/ -- (NSString*) buildQuery: (NSString*)stmt,...; +- (NSString*) buildQuery: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Takes the query statement and substitutes in values from @@ -588,7 +588,7 @@ SQLCLIENT_PRIVATE * the number of rows to which the operation applied. Otherwise this * returns -1. */ -- (NSInteger) execute: (NSString*)stmt,...; +- (NSInteger) execute: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Takes the statement and substitutes in values from @@ -703,7 +703,7 @@ SQLCLIENT_PRIVATE *

Date and timestamp field items are returned as NSDate objects. *

*/ -- (NSMutableArray*) query: (NSString*)stmt,...; +- (NSMutableArray*) query: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Takes the query statement and substitutes in values from @@ -744,7 +744,7 @@ SQLCLIENT_PRIVATE /** * Produce a quoted string from the supplied arguments (printf style). */ -- (NSString*) quotef: (NSString*)fmt, ...; +- (NSString*) quotef: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** * Convert a big (64 bit) integer to a string suitable for use in an SQL query. @@ -1158,7 +1158,7 @@ SQLCLIENT_PRIVATE * (raising an exception if the query did not contain a single record) * and returns the resulting record. */ -- (SQLRecord*) queryRecord: (NSString*)stmt,...; +- (SQLRecord*) queryRecord: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Executes a query (like the -query:,... method) and checks the result.
@@ -1166,7 +1166,7 @@ SQLCLIENT_PRIVATE * if the record did not contain a single field.
* Returns the resulting field as a string. */ -- (NSString*) queryString: (NSString*)stmt,...; +- (NSString*) queryString: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Convenience method to deal with the results of a query where each @@ -1223,7 +1223,7 @@ SQLCLIENT_PRIVATE * The default implementation calls NSLogv to log a debug message.
* Override this in a category to provide more sophisticated logging. */ -- (void) debug: (NSString*)fmt, ...; +- (void) debug: (NSString*)fmt, ... NS_FORMAT_FUNCTION(1,2); /** * Return the current debugging level.
@@ -1275,7 +1275,7 @@ SQLCLIENT_PRIVATE * stmt and the following values (if any). */ - (NSMutableArray*) cache: (int)seconds - query: (NSString*)stmt,...; + query: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Calls -cache:simpleQuery:recordType:listType: with the default @@ -1378,7 +1378,7 @@ SQLCLIENT_PRIVATE * [SQLClient-execute:,...] but does not cause any database operation * until -execute is called, so it will not raise a database exception. */ -- (void) add: (NSString*)stmt,...; +- (void) add: (NSString*)stmt, ... NS_REQUIRES_NIL_TERMINATION; /** * Adds an SQL statement to the transaction. This is similar to diff --git a/SQLClient.m b/SQLClient.m index 08284c6..4160153 100644 --- a/SQLClient.m +++ b/SQLClient.m @@ -1622,7 +1622,7 @@ static unsigned int maxConnections = 8; - (NSString*) quoteBigInteger: (int64_t)i { - return [NSString stringWithFormat: @"%lld", i]; + return [NSString stringWithFormat: @"%lld", (long long)i]; } - (NSString*) quoteCString: (const char *)s