WCTInterface Class Reference

Inherits from WCTCore : NSObject
Declared in WCTInterface.h

Overview

Thread-safe

WCTInterface(Convenient) category contains the combination of common operations on SQL. Although it’s all glue code here, it works and it can bring you convenience. It’s fairly straightforward so that no comment here.

ChainCall Methods

– prepareInsertObjectsOfClass:into:

Generate a WCTInsert to do an insertion.

- (WCTInsert *)prepareInsertObjectsOfClass:(Class)cls into:(NSString *)tableName

Parameters

cls

The class of the object to be inserted.

tableName

The name of the table to be used to do an insertion.

Return Value

WCTInsert

Declared In

WCTInterface+ChainCall.h

– prepareInsertOrReplaceObjectsOfClass:into:

Generate a WCTInsert to do an insertion or replacement.

- (WCTInsert *)prepareInsertOrReplaceObjectsOfClass:(Class)cls into:(NSString *)tableName

Parameters

cls

The class of the object to be inserted.

tableName

The name of the table to be used to do an insertion.

Return Value

WCTInsert

Declared In

WCTInterface+ChainCall.h

– prepareInsertObjectsOnProperties:into:

Generate a WCTInsert to do a partial insertion.

- (WCTInsert *)prepareInsertObjectsOnProperties:(const WCTPropertyList &)propertyList into:(NSString *)tableName

Parameters

propertyList

The specific properties to be inserted.

tableName

The name of the table to be used to do an insertion.

Return Value

WCTInsert

Declared In

WCTInterface+ChainCall.h

– prepareInsertOrReplaceObjectsOnProperties:into:

Generate a WCTInsert to do a partial insertion or replacement.

- (WCTInsert *)prepareInsertOrReplaceObjectsOnProperties:(const WCTPropertyList &)propertyList into:(NSString *)tableName

Parameters

propertyList

The specific properties to be inserted.

tableName

The name of the table to be used to do an insertion.

Return Value

WCTInsert

Declared In

WCTInterface+ChainCall.h

– prepareDeleteFromTable:

Generate a WCTDelete to do a deletion.

- (WCTDelete *)prepareDeleteFromTable:(NSString *)tableName

Parameters

tableName

The name of the table to be used to do a deletion.

Return Value

WCTDelete

Declared In

WCTInterface+ChainCall.h

– prepareUpdateTable:onProperties:

Generate a WCTUpdate to do an update.

- (WCTUpdate *)prepareUpdateTable:(NSString *)tableName onProperties:(const WCTPropertyList &)propertyList

Parameters

tableName

The name of the table to be used to do an update.

propertyList

The specific properties to be updated.

Return Value

WCTUpdate

Declared In

WCTInterface+ChainCall.h

– prepareSelectObjectsOfClass:fromTable:

Generate a WCTSelect to do an object selection.

- (WCTSelect *)prepareSelectObjectsOfClass:(Class)cls fromTable:(NSString *)tableName

Parameters

cls

The class of the object to be selected.

tableName

The name of the table to be used to do a selection.

Return Value

WCTSelect

Declared In

WCTInterface+ChainCall.h

– prepareSelectObjectsOnResults:fromTable:

Generate a WCTSelect to do an object selection on the specific results.

- (WCTSelect *)prepareSelectObjectsOnResults:(const WCTResultList &)resultList fromTable:(NSString *)tableName

Parameters

resultList

The column results to be selected.

tableName

The name of the table to be used to do a selection.

Return Value

WCTSelect

Declared In

WCTInterface+ChainCall.h

– prepareSelectRowsOnResults:fromTable:

Generate a WCTRowSelect to do a row selection on the specific results.

- (WCTRowSelect *)prepareSelectRowsOnResults:(const WCTResultList &)resultList fromTable:(NSString *)tableName

Parameters

resultList

The column results to be selected.

tableName

The name of the table to be used to do a selection.

Return Value

WCTRowSelect

Declared In

WCTInterface+ChainCall.h

– prepareSelectRowsOnResults:fromTables:

Generate a WCTRowSelect to do a row selection on the specific results.

- (WCTRowSelect *)prepareSelectRowsOnResults:(const WCTResultList &)resultList fromTables:(NSArray<NSString*> *)tableNames

Parameters

resultList

The column results to be selected.

tableNames

The name of the table to be used to do a selection.

Return Value

WCTRowSelect

Declared In

WCTInterface+ChainCall.h

– prepareSelectMultiObjectsOnResults:fromTables:

Generate a WCTMultiSelect to do a cross table selection on the specific results.

- (WCTMultiSelect *)prepareSelectMultiObjectsOnResults:(const WCTResultList &)resultList fromTables:(NSArray<NSString*> *)tableNames

Parameters

resultList

The column results to be selected.

tableNames

The name of the table to be used to do a selection.

Return Value

WCTMultiSelect

Declared In

WCTInterface+ChainCall.h

Core Methods

– exec:

Exec a specific sql. Note that you can use this interface to execute a SQL that is not contained in the WCDB interface layer

- (BOOL)exec:(const WCDB : : Statement &)statement

Parameters

statement

WINQ statement

Return Value

YES if it is successfully executed

Declared In

WCTInterface+Core.h

– prepare:

This interface is equivalent to [interface prepare:statement withError:nil];

- (WCTStatement *)prepare:(const WCDB : : Statement &)statement

Parameters

statement

WINQ statement

Return Value

WCTStatement

See Also

Declared In

WCTInterface+Core.h

– prepare:withError:

Prepare a specific sql. Note that you can use this interface to prepare a SQL that is not contained in the WCDB interface layer

- (WCTStatement *)prepare:(const WCDB : : Statement &)statement withError:(WCTError **)error

Parameters

statement

WINQ statement

Return Value

WCTStatement

See Also

Declared In

WCTInterface+Core.h