GTAdhocAPI
Gran Turismo (6) Adhoc API Documentation
Loading...
Searching...
No Matches
pdistd::MSqlite Class Reference

SQLite Library Interface Object. More...

Inheritance diagram for pdistd::MSqlite:
System::Object

Public Member Functions

 MSqlite ()
 
Int open (String db_name, UInt buffer_size=0x8000, Int flags=0, String salsa_key=nil)
 Opens SQLite file. More...
 
Int close ()
 Closes SQLite instance. More...
 
Int begin ()
 Begin Transaction. More...
 
Int commit ()
 Commit. More...
 
Int rollback ()
 Rollback. More...
 
Int execute0 (String query)
 Executes query without return. More...
 
Int execute (String query, Array parameters)
 Executes query without return. More...
 
Int executeTransaction (Array< String, Array< Object > > queries)
 Executes Transaction. More...
 
Array< ArrayexecuteQuery (String query, Array parameters)
 Executes Query. More...
 
Array executeQuery1C (String query, Array parameters)
 Executes query and returns the first column. More...
 
Object executeQuery1R1C (String query, Array parameters)
 Executes query and returns the first column of the first row. More...
 
Array executeQueryBegin (Array queries, Array unk=nil, Bool unk2=false)
 
void executeQueryNext (Object unk, Bool unk2)
 
void executeQueryEnd ()
 sqlite3_finalize More...
 
MSqliteIterator< STRecordquery (String query, Array parameters)
 Queries. More...
 
Array< STRecordqueryList (String query, Array parameters)
 Queries a list. More...
 
STRecord query1 (String query, Array parameters)
 Queries one row. More...
 
Int count (String query, Array parameters)
 Returns amount of rows with specified query. More...
 
Int getLastError ()
 Gets the last SQLite error. More...
 
Int changes ()
 Gets the current amount of changes. More...
 
String getDBPath ()
 Gets the path to the DB. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 constructor taking no param More...
 
Bool isInstanceOf (Class classType)
 Returns whether an object is of a specific class/type. More...
 
Object getDeepCopy ()
 Gets a deep copy of this object. More...
 
void setDeepCopy (Object obj)
 Unk. More...
 
String dump ()
 Dumps all info about an object. More...
 
Object getObjectAttribute (string path)
 
void setObjectAttribute (string path, Object value)
 
Bool hasPrimitiveInterface ()
 Returns whether this object has a primitive interface. More...
 
Bool toBool ()
 Casts this object to Bool. More...
 
Byte toByte ()
 Casts this object to Byte. More...
 
Short toShort ()
 Casts this object to Short. More...
 
Int toInt ()
 Casts this object to Int. More...
 
Long toLong ()
 Casts this object to Long. More...
 
UByte toUByte ()
 Casts this object to UByte. More...
 
UShort toUShort ()
 Casts this object to UShort. More...
 
UInt toUInt ()
 Casts this object to UInt. More...
 
ULong toULong ()
 Casts this object to ULong. More...
 
Float toFloat ()
 Casts this object to Float. More...
 
Double toDouble ()
 Casts this object to Double. More...
 
String toString ()
 Casts this object to String. More...
 
Symbol toSymbol ()
 Casts this object to Symbol. More...
 
Bool hasArrayInterface ()
 Returns whether this object has an Array interface. More...
 
Int getArrayCount ()
 Gets the Array item count for this object. More...
 
void setArrayCount ()
 Sets the Array item count for this object. More...
 
Object getArrayElement (Object arg0)
 Gets an Array item for this object. More...
 
void setArrayElement (Object arg0, Object arg1)
 Sets the Array item for this object. More...
 
Bool hasMapInterface ()
 Returns whether this object has a Map interface. More...
 
int getMapCount ()
 Returns the count of items in the map. More...
 
void setMapElement (Object arg0, Object arg1)
 Returns whether the Map has a specific object key. Bool hasMapElement(Object arg0);. More...
 
Object getMapElement (Object arg0)
 Gets a Map element by key. More...
 
void hasGeneratorInterface ()
 Returns whether this object has a generator interface. More...
 
Iterator generator ()
 Returns generator (?) More...
 
void hasIteratorInterface ()
 Returns whether this object has an iterator. More...
 
Iterator iterator ()
 Gets the iterator for this object. More...
 
void hasVariableInterface ()
 Returns whether this object is a variable. More...
 
void hasFunctionInterface ()
 Returns whether this object has a function interface. More...
 
Object call ()
 Calls this object as a function. More...
 
Bool hasByteDataInterface ()
 Returns whether this object has a byte data interface. More...
 
Int getByteDataCount ()
 Returns the ByteData size for this object. More...
 
void setByteDataCount (Int count)
 Sets the ByteData size for this object. More...
 
Int getByteDataCapacity ()
 Returns the ByteData capacity for this object. More...
 
void setByteDataCapacity (Int capacity)
 Sets the ByteData capacity for this object. More...
 
ByteData getByteData ()
 Gets the underlaying ByteData. More...
 
void setByteData (ByteData bytedata)
 Sets the underlaying ByteData. More...
 
void hasObjectSelectorInterface ()
 Returns whether this object has an object selector interface. More...
 
void self ()
 Gets the get for this object if it has a get interface. More...
 
void getArchiveTree ()
 
void setArchiveTree ()
 
ByteData serialize ()
 Serializes this object. More...
 
void deserialize (ByteData serializedData)
 Deserializes this object. More...
 
void defined (Object obj)
 Returns whether a certain object is defined within this object. More...
 
Array find_all (FunctionObject func)
 Finds all the elements in this object that matches the predicates. More...
 
void each_all (FunctionObject func)
 Applies callback to all elements in this object. More...
 
Array map_all (FunctionObject< Object > func)
 Maps all the elements in this object. More...
 
Bool operator!= ()
 Returns whether this object is not equal to another. More...
 
Bool operator== ()
 Returns whether this object is equal to another. More...
 

Static Public Member Functions

static String EscapeString (String query)
 Escapes SQL string. More...
 

Additional Inherited Members

- Public Attributes inherited from System::Object
Int rc_size
 Getter-only. Reference counter size of this object. More...
 
Object rc_class
 Getter-only. Type name of the object. More...
 
Int rc_count
 Getter-only. Reference count of this object. More...
 
Int weak_count
 Getter-only. Weak reference count of this object. More...
 
Class class_id
 Class (type) object for this object. More...
 

Detailed Description

SQLite Library Interface Object.

Definition at line 6 of file MSqlite.cpp.

Constructor & Destructor Documentation

◆ MSqlite()

pdistd::MSqlite::MSqlite ( )
inline

Definition at line 10 of file MSqlite.cpp.

Member Function Documentation

◆ begin()

Int pdistd::MSqlite::begin ( )

Begin Transaction.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ changes()

Int pdistd::MSqlite::changes ( )

Gets the current amount of changes.

Returns
Row count

◆ close()

Int pdistd::MSqlite::close ( )

Closes SQLite instance.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ commit()

Int pdistd::MSqlite::commit ( )

Commit.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ count()

Int pdistd::MSqlite::count ( String  query,
Array  parameters 
)

Returns amount of rows with specified query.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Returns an iterator

◆ EscapeString()

static String pdistd::MSqlite::EscapeString ( String  query)
static

Escapes SQL string.

◆ execute()

Int pdistd::MSqlite::execute ( String  query,
Array  parameters 
)

Executes query without return.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ execute0()

Int pdistd::MSqlite::execute0 ( String  query)

Executes query without return.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ executeQuery()

Array< Array > pdistd::MSqlite::executeQuery ( String  query,
Array  parameters 
)

Executes Query.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Array of rows with an array of columns

◆ executeQuery1C()

Array pdistd::MSqlite::executeQuery1C ( String  query,
Array  parameters 
)

Executes query and returns the first column.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Each row with the value of the first column

◆ executeQuery1R1C()

Object pdistd::MSqlite::executeQuery1R1C ( String  query,
Array  parameters 
)

Executes query and returns the first column of the first row.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Each row with the value of the first column

◆ executeQueryBegin()

Array pdistd::MSqlite::executeQueryBegin ( Array  queries,
Array  unk = nil,
Bool  unk2 = false 
)

◆ executeQueryEnd()

void pdistd::MSqlite::executeQueryEnd ( )

sqlite3_finalize

◆ executeQueryNext()

void pdistd::MSqlite::executeQueryNext ( Object  unk,
Bool  unk2 
)

◆ executeTransaction()

Int pdistd::MSqlite::executeTransaction ( Array< String, Array< Object > >  queries)

Executes Transaction.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ getDBPath()

String pdistd::MSqlite::getDBPath ( )

Gets the path to the DB.

◆ getLastError()

Int pdistd::MSqlite::getLastError ( )

Gets the last SQLite error.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ open()

Int pdistd::MSqlite::open ( String  db_name,
UInt  buffer_size = 0x8000,
Int  flags = 0,
String  salsa_key = nil 
)

Opens SQLite file.

Parameters
db_nameDatabase file name.
buffer_sizeInitial db size. 0 if reading from existing file
flagsRefer to https://www.sqlite.org/c3ref/c_open_autoproxy.html - To create a new file, use SQLITE_OPEN_READWRITE (2) | SQLITE_OPEN_CREATE (4)
salsa_keyEncryption key, if not used, no encryption used
Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

◆ query()

MSqliteIterator< STRecord > pdistd::MSqlite::query ( String  query,
Array  parameters 
)

Queries.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Returns an iterator
foreach (var r in obj.query("SELECT * FROM GENERIC_CAR"))
var label = r.Label; // r is STRecord

◆ query1()

STRecord pdistd::MSqlite::query1 ( String  query,
Array  parameters 
)

Queries one row.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Returns an iterator

◆ queryList()

Array< STRecord > pdistd::MSqlite::queryList ( String  query,
Array  parameters 
)

Queries a list.

Parameters
querySQL Query string
parametersEach parameter replaces '?' in the query string
Returns
Returns an iterator

◆ rollback()

Int pdistd::MSqlite::rollback ( )

Rollback.

Returns
Sqlite Error - Refer to https://www.sqlite.org/rescode.html

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