Qore Programming Language Reference Manual 1.19.2
Loading...
Searching...
No Matches
QC_SQLStatement.dox.h
1
2namespace Qore {
4namespace SQL {
6
64
65public:
67
78bool active();
79
80public:
82
94
95public:
97
103
104public:
106
131nothing bind( ...);
132
133public:
135
161nothing bindArgs(softlist<auto> vargs);
162
163public:
165
189nothing bindPlaceholders( ...);
190
191public:
193
218nothing bindPlaceholdersArgs(softlist<auto> vargs);
219
220public:
222
247nothing bindValues( ...);
248
249public:
251
275nothing bindValuesArgs(softlist<auto> vargs);
276
277public:
279
284nothing close();
285
286public:
288
295nothing commit();
296
297public:
299
313
314public:
316
330
331public:
333
336
337public:
339
352
353public:
355
374nothing define();
375
376public:
378
385hash<auto> describe();
386
387public:
389
395
396public:
398
424nothing exec( ...);
425
426public:
428
455nothing execArgs(softlist<auto> vargs);
456
457public:
459
476hash<auto> fetchColumns(softint rows = -1);
477
478public:
480
495*hash<auto> fetchRow();
496
497public:
499
516list<auto> fetchRows(softint rows = -1);
517
518public:
520
531hash<auto> getOutput();
532
533public:
535
546hash<auto> getOutputRows();
547
548public:
550
557*string getSQL();
558
559public:
561
580*hash<auto> getValue();
581
582public:
584
611auto memberGate(string key);
612
613public:
615
630bool next();
631
632public:
634
645nothing prepare(string sql, ...);
646
647public:
649
660nothing prepareRaw(string sql);
661
662public:
664
671nothing rollback();
672
673public:
675
686bool valid();
687};
688}
689}
This class defines an abstract interface for the SQLStatement class.
Definition: QC_AbstractSQLStatement.dox.h:11
This class provides the Qore interface to databases.
Definition: QC_Datasource.dox.h:106
Provides transparent per-thread, per-transaction datasource connection pooling.
Definition: QC_DatasourcePool.dox.h:50
The SQLStatement class provides the most flexibilty for executing SQL on a database server.
Definition: QC_SQLStatement.dox.h:63
nothing bindValuesArgs(softlist< auto > vargs)
Binds values to value buffer specifications given as a list in the single argument to the method to v...
hash< auto > getOutput()
Retrieves output buffers as a hash; result sets will be returned as hashes of lists.
nothing define()
Performs an explicit define operation on the SQLStatement.
destructor()
Closes the statement if it is open and destroys the object.
*hash< auto > getValue()
Retrieves the current row as a hash where the keys are the column names and the values are the column...
bool next()
Increments the row pointer when retrieving rows from a select statement; returns True if there is a r...
constructor(Datasource ds)
Creates the SQLStatement object based on the given Datasource object that provides the connection to ...
nothing beginTransaction()
Manually starts a transaction and allocates a connection or grabs the transaction lock according to t...
hash< auto > describe()
Describes columns in the statement result.
nothing commit()
Commits the transaction, releases the connection or the transaction lock according to the object used...
bool currentThreadInTransaction()
Returns True if the current thread is in a transaction (i.e. holds the transaction lock),...
nothing rollback()
Closes the SQLStatement, performs a transaction rollback, and releases the connection or the transact...
nothing close()
Closes the statement if it is open, however this method does not release the connection or transactio...
nothing execArgs(softlist< auto > vargs)
Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffe...
*string getSQL()
Returns the current SQL string set with the call to SQLStatement::prepare() or SQLStatement::prepareR...
bool valid()
returns True if the object is currently pointing at a valid element, False if not (use when iterating...
int affectedRows()
Returns the number of rows affected by the last call to SQLStatement::exec()
nothing bindArgs(softlist< auto > vargs)
Binds placeholder buffer specifications and values given as a list in the single argument to the meth...
copy()
Throws an exception; objects of this class cannot be copied.
hash< auto > fetchColumns(softint rows=-1)
Retrieves a block of rows as a hash of lists with the maximum number of rows determined by the argume...
list< auto > fetchRows(softint rows=-1)
Retrieves a block of rows as a list of hashes with the maximum number of rows determined by the argum...
nothing prepareRaw(string sql)
Saves an SQL statement that will be prepared and executed later.
nothing bindPlaceholders(...)
Binds placeholder buffer specifications to buffers defined in SQLStatement::prepare()
hash< auto > getOutputRows()
Retrieves output buffers as a hash; result sets will be returned as lists of hashes.
bool active()
Returns True if the object is currently active and has a connection or transaction lock allocated to ...
nothing bindValues(...)
Binds values to value buffer specifications to buffers defined in SQLStatement::prepare()
nothing bindPlaceholdersArgs(softlist< auto > vargs)
Binds placeholder buffer specifications given as a list in the single argument to the method to buffe...
nothing prepare(string sql,...)
Saves an SQL statement that will be prepared and executed later, along with optional arguments.
nothing bind(...)
Binds placeholder buffer specifications and values to buffers defined in SQLStatement::prepare()
*hash< auto > fetchRow()
Retrieves the current row as a hash where the keys are the column names and the values are the column...
nothing exec(...)
Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffe...
constructor(DatasourcePool dsp)
Creates the SQLStatement object based on the given DatasourcePool object that provides the connection...
auto memberGate(string key)
This method allows SQLStatement objects to be dereferenced directly as a hash for the current row bei...
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2