DatabaseKit  0.5
DB Class Reference

#import <DB.h>

Inheritance diagram for DB:
[legend]
Collaboration diagram for DB:
[legend]

Instance Methods

(instancetype) - initWithConnection:
 
(DBTable *) - objectForKeyedSubscript:
 
(DBCreateTableQuery *) - create
 
(BOOL) - saveObjects:
 
(void) - registerObject:
 
(void) - removeObject:
 
(BOOL) - migrateSchema:
 
(BOOL) - migrateModelClasses:error:
 

Class Methods

(DB *) + withURL:
 
(DB *) + withURL:error:
 

Properties

DBConnectionconnection
 

Detailed Description

Definition at line 5 of file DB.h.

Method Documentation

- (DBCreateTableQuery *) create

Returns a CREATE TABLE query

Definition at line 58 of file DB.m.

References DBQuery::withDatabase:.

- (instancetype) initWithConnection: (DBConnection *)  aConnection

Definition at line 32 of file DB.m.

References _dirtyObjects.

- (BOOL) migrateModelClasses: (NSArray *)  classes
error: (NSError **)  outErr 

Provided by category DB(Migrations).

Definition at line 76 of file DB+Migrations.m.

Referenced by migrateSchema:.

- (BOOL) migrateSchema: (NSError **)  outErr

Provided by category DB(Migrations).

Definition at line 69 of file DB+Migrations.m.

References migrateModelClasses:error:.

- (id) objectForKeyedSubscript: (id)  key

Returns a table whose name matches key or nil if it doesn't exist

Definition at line 42 of file DB.m.

References _tableLock, _tables, key, and DBTable::withDatabase:name:.

- (void) registerObject: (DBModel *)  object

Registers a DBModel object with the database

Parameters
objectThe object to register. Raises NSInternalInconsistencyException if the object is nil, or already registered with a database.

Provided by category DB(DBModel).

- (void) removeObject: (DBModel *)  object

Remvoves a registered DBModel object from the database.

Parameters
objectThe object to remove. Raises NSInternalInconsistencyException if the object is not already in the database.

Provided by category DB(DBModel).

- (BOOL) saveObjects: (NSError **)  outErr

Saves any objects with pending changes.

Provided by category DB(DBModel).

+ (DB *) withURL: (NSURL *)  URL

Definition at line 16 of file DB.m.

References withURL:error:.

+ (DB *) withURL: (NSURL *)  URL
error: (NSError **)  err 

Definition at line 21 of file DB.m.

References DBConnectionProxy::connectionProxyWithURL:error:.

Referenced by withURL:.

Property Documentation

- (DBConnection*) connection
readatomicstrong

Definition at line 6 of file DB.h.


The documentation for this class was generated from the following files: