Qore Programming Language Reference Manual  0.8.13.5
 All Classes Namespaces Functions Variables Groups Pages
QC_SQLStatement.dox.h
1 namespace Qore::SQL {
4 
62 
63 public:
65 
76 bool active();
77 
78 public:
80 
91 int affectedRows();
92 
93 public:
95 
100 nothing beginTransaction();
101 
102 public:
104 
129 nothing bind( ...);
130 
131 public:
133 
159 nothing bindArgs(softlist vargs);
160 
161 public:
163 
187 nothing bindPlaceholders( ...);
188 
189 public:
191 
216 nothing bindPlaceholdersArgs(softlist vargs);
217 
218 public:
220 
245 nothing bindValues( ...);
246 
247 public:
249 
273 nothing bindValuesArgs(softlist vargs);
274 
275 public:
277 
282 nothing close();
283 
284 public:
286 
293 nothing commit();
294 
295 public:
297 
311 
312 public:
314 
328 
329 public:
331 
333  copy();
334 
335 public:
337 
350 
351 public:
353 
372 nothing define();
373 
374 public:
376 
383 hash describe();
384 
385 public:
387 
392  destructor();
393 
394 public:
396 
422 nothing exec( ...);
423 
424 public:
426 
453 nothing execArgs(softlist vargs);
454 
455 public:
457 
474 hash fetchColumns(softint rows = -1);
475 
476 public:
478 
493 *hash fetchRow();
494 
495 public:
497 
514 list fetchRows(softint rows = -1);
515 
516 public:
518 
529 hash getOutput();
530 
531 public:
533 
545 
546 public:
548 
555 *string getSQL();
556 
557 public:
559 
578 *hash getValue();
579 
580 public:
582 
609 auto memberGate(string key);
610 
611 public:
613 
628 bool next();
629 
630 public:
632 
643 nothing prepare(string sql, ...);
644 
645 public:
647 
658 nothing prepareRaw(string sql);
659 
660 public:
662 
669 nothing rollback();
670 
671 public:
673 
684 bool valid();
685 };
686 };
nothing prepareRaw(string sql)
Saves an SQL statement that will be prepared and executed later.
nothing bindValues(...)
Binds values to value buffer specifications to buffers defined in SQLStatement::prepare() ...
list 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 execArgs(softlist vargs)
Executes the bound statement with any bound buffers, also optionally allows binding placeholder buffe...
*hash getValue()
Retrieves the current row as a hash where the keys are the column names and the values are the column...
hash describe()
Describes columns in the statement result.
bool currentThreadInTransaction()
Returns True if the current thread is in a transaction (i.e. holds the transaction lock)...
*hash 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...
nothing commit()
Commits the transaction, releases the connection or the transaction lock according to the object used...
hash getOutputRows()
Retrieves output buffers as a hash; result sets will be returned as lists of hashes.
copy()
Throws an exception; objects of this class cannot be copied.
Provides transparent per-thread, per-transaction datasource connection pooling.
Definition: QC_DatasourcePool.dox.h:41
hash getOutput()
Retrieves output buffers as a hash; result sets will be returned as hashes of lists.
int affectedRows()
Returns the number of rows affected by the last call to SQLStatement::exec()
nothing close()
Closes the statement if it is open, however this method does not release the connection or transactio...
nothing bindValuesArgs(softlist vargs)
Binds values to value buffer specifications given as a list in the single argument to the method to v...
list list(...)
Returns an untyped list of the arguments passed at the top level.
nothing rollback()
Closes the SQLStatement, performs a transaction rollback, and releases the connection or the transact...
The SQLStatement class provides the most flexibilty for executing SQL on a database server...
Definition: QC_SQLStatement.dox.h:61
*string getSQL()
Returns the current SQL string set with the call to SQLStatement::prepare() or SQLStatement::prepareR...
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...
destructor()
Closes the statement if it is open and destroys the object.
hash fetchColumns(softint rows=-1)
Retrieves a block of rows as a hash of lists with the maximum number of rows determined by the argume...
bool next()
Increments the row pointer when retrieving rows from a select statement; returns True if there is a r...
nothing bindPlaceholdersArgs(softlist vargs)
Binds placeholder buffer specifications given as a list in the single argument to the method to buffe...
auto memberGate(string key)
This method allows SQLStatement objects to be dereferenced directly as a hash for the current row bei...
bool active()
Returns True if the object is currently active and has a connection or transaction lock allocated to ...
nothing bindPlaceholders(...)
Binds placeholder buffer specifications to buffers defined in SQLStatement::prepare() ...
nothing prepare(string sql,...)
Saves an SQL statement that will be prepared and executed later, along with optional arguments...
nothing bindArgs(softlist vargs)
Binds placeholder buffer specifications and values given as a list in the single argument to the meth...
nothing define()
Performs an explicit define operation on the SQLStatement.
bool valid()
returns True if the object is currently pointing at a valid element, False if not (use when iterating...
hash hash(object obj)
Returns a hash of an object's members.
This class provides the Qore interface to databases.
Definition: QC_Datasource.dox.h:96
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10
nothing bind(...)
Binds placeholder buffer specifications and values to buffers defined in SQLStatement::prepare() ...