mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Allow RecordSet to be constructed from statements.
This commit is contained in:
parent
20cb308c3f
commit
c4c88fd97c
@ -581,6 +581,7 @@ void Register_POCO_Data(HSQUIRRELVM vm, Table &)
|
|||||||
ns.Bind(_SC("RecordSet"),
|
ns.Bind(_SC("RecordSet"),
|
||||||
Class< SqDataRecordSet >(vm, SqPcDataRecordSet::Str)
|
Class< SqDataRecordSet >(vm, SqPcDataRecordSet::Str)
|
||||||
// Constructors
|
// Constructors
|
||||||
|
.Ctor< SqDataStatement & >()
|
||||||
.Ctor< SqDataSession &, StackStrF & >()
|
.Ctor< SqDataSession &, StackStrF & >()
|
||||||
// Meta-methods
|
// Meta-methods
|
||||||
.SquirrelFunc(_SC("_typename"), &SqPcDataRecordSet::Fn)
|
.SquirrelFunc(_SC("_typename"), &SqPcDataRecordSet::Fn)
|
||||||
|
@ -1230,7 +1230,7 @@ struct SqDataStatement : public Statement
|
|||||||
void UseInst_(LightObj & obj, const std::string & name, Poco::Data::AbstractBinding::Direction dir);
|
void UseInst_(LightObj & obj, const std::string & name, Poco::Data::AbstractBinding::Direction dir);
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Bind a value to the statement and mark it as input (i.e alias of Use).
|
* Bind a reference to the statement and mark it as input (i.e alias of Use).
|
||||||
*/
|
*/
|
||||||
SqDataStatement & In(LightObj & obj)
|
SqDataStatement & In(LightObj & obj)
|
||||||
{
|
{
|
||||||
@ -1238,7 +1238,7 @@ struct SqDataStatement : public Statement
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Bind a named value to the statement mark it as input (i.e alias of UseAs).
|
* Bind a named reference to the statement mark it as input (i.e alias of UseAs).
|
||||||
*/
|
*/
|
||||||
SqDataStatement & InAs(LightObj & obj, StackStrF & name)
|
SqDataStatement & InAs(LightObj & obj, StackStrF & name)
|
||||||
{
|
{
|
||||||
@ -1292,7 +1292,7 @@ struct SqDataStatement : public Statement
|
|||||||
void BindInst_(LightObj & obj, const std::string & name, Poco::Data::AbstractBinding::Direction dir);
|
void BindInst_(LightObj & obj, const std::string & name, Poco::Data::AbstractBinding::Direction dir);
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Bind a value to the statement and mark it as input/output.
|
* Bind a value/reference to the statement and mark it as input/output.
|
||||||
*/
|
*/
|
||||||
SqDataStatement & Io(LightObj & obj)
|
SqDataStatement & Io(LightObj & obj)
|
||||||
{
|
{
|
||||||
@ -1373,6 +1373,14 @@ template < class T > inline SqDataBinding< T > & SqDataBinding< T >::BindAs(SqDa
|
|||||||
*/
|
*/
|
||||||
struct SqDataRecordSet : public RecordSet
|
struct SqDataRecordSet : public RecordSet
|
||||||
{
|
{
|
||||||
|
/* --------------------------------------------------------------------------------------------
|
||||||
|
* Creates the RecordSet for the given statement.
|
||||||
|
*/
|
||||||
|
SqDataRecordSet(SqDataStatement & stmt)
|
||||||
|
: RecordSet(stmt)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Creates the RecordSet for the given query.
|
* Creates the RecordSet for the given query.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user