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