@@ -20,20 +20,23 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "PGResult.h" +#import "PGResult+Private.h" #import "PGResultRow.h" #import "PGResultRow+Private.h" @implementation PGResult -+ (instancetype)PG_resultWithResult: (PGresult *)result +@synthesize pg_result = _result; + ++ (instancetype)pg_resultWithResult: (PGresult *)result { - return [[[self alloc] PG_initWithResult: result] autorelease]; + return [[[self alloc] pg_initWithResult: result] autorelease]; } -- (instancetype)PG_initWithResult: (PGresult *)result +- (instancetype)pg_initWithResult: (PGresult *)result { self = [super init]; _result = result; @@ -56,14 +59,9 @@ - (id)objectAtIndex: (size_t)index { if (index > PQntuples(_result)) @throw [OFOutOfRangeException exception]; - return [PGResultRow PG_rowWithResult: self + return [PGResultRow pg_rowWithResult: self row: (int)index]; } - -- (PGresult *)PG_result -{ - return _result; -} @end