Inherits from NSObject_Singleton : NSObject
Declared in ORDA.h
ORDA.m

Overview

The goal of the Objective Relational Database Abstraction is to provide a simple interface that abstracts interaction with RDBMSes from their respective APIs by creating a system whose externally visible details are agnostic of the particular system being used. Because of the idiosyncracy of the various systems that this API is attempting to cohere, the full power of those APIs will be unavaliable without breaking the abstraction. This system is intended to be similar to JDBC in that the user supplies a URL with some prefix (the scheme) and the manager (this class) determines the correct ORDA driver to handle said scheme and passes the URL to it, generating a governor.

Tasks

Drivers

Governors

Other Methods

Extension Methods

Properties

registeredDrivers

The currently registered drivers

@property (readonly) NSArray *registeredDrivers

Discussion

This provides a mechanism by which the currently registered drivers can be retreived. I’m not sure why this exists.

Declared In

ORDA+Private.h

Class Methods

code:matchesClass:

Checks a code against a class

+ (BOOL)code:(ORDAResultCode)code matchesClass:(ORDAResultCodeClass)class

Parameters

code

the code

class

the class

Return Value

true if the code matches the class

Discussion

This calls code:matchesCode:withMask:, passing class as test and kORDAResultCodeClassMask as mask.

Declared In

ORDA+Private.h

code:matchesCode:withMask:

Checks a code against another code with a mask

+ (BOOL)code:(ORDAResultCode)code matchesCode:(ORDACode)test withMask:(ORDAResultCodeMask)mask

Parameters

code

the code

test

the code to test against

mask

the mask to use

Return Value

true if code matches test after masking

Discussion

This simply checks to see if code equals test after code has been masked (ANDed) with the mask.

Declared In

ORDA+Private.h

code:matchesSubclass:

Checks a code against a subclass

+ (BOOL)code:(ORDAResultCode)code matchesSubclass:(ORDAResultCodeSubclass)subclass

Parameters

code

the code

subclass

the subclass

Return Value

true if the code matches the subclass

Discussion

This calls code:matchesCode:withMask:, passing subclass as test and kORDAResultCodeSubclassMask as mask.

Declared In

ORDA+Private.h

Instance Methods

governorForURL:

Generates a governor for a URL

- (id<ORDAGovernor>)governorForURL:(NSURL *)URL

Parameters

URL

the URL

Return Value

the governor or an error result

Discussion

This retreives the driver associated with the URL’s scheme and uses said driver to generate a governor (which is returned). The possible non-success result codes are: kORDANilURILErrorResultCode if the URL is nil, kORDAMissingDriverErrorResultCode if no driver is associated with the scheme, kORDABadURLErrorResultCode if the URL-sans-scheme cannot be parsed as a URL. It is important to know that the driver may return a non-success result.

See Also

Declared In

ORDA.h

registerDriver:

Registers a driver

- (void)registerDriver:(id<ORDADriver>)driver

Parameters

driver

the driver

Discussion

This associates the specified driver with it’s scheme in the ORDA system so that it can be later used to generate a governor from a URL.

Declared In

ORDA.h