ColumnCount not implemented
3 posts
• Page 1 of 1
ColumnCount not implemented
PDOStatement class in PHP has a ColumnCount method.
http://php.net/manual/es/pdostatement.columncount.php
This is not implement in Phalanger's PDO extension.
Greetings,
http://php.net/manual/es/pdostatement.columncount.php
This is not implement in Phalanger's PDO extension.
Greetings,
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: ColumnCount not implemented
This made the trick, I'm not sure if the implementation is right.
#region columnCount
[PhpVisible, ImplementsMethod]
public virtual object columnCount(ScriptContext context)
{
if (this.CurrentReader != null)
{
return this.CurrentReader.FieldCount;
}
return -1;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public static object columnCount(object instance, PhpStack stack)
{
stack.RemoveFrame();
return ((PDOStatement)instance).columnCount(stack.Context);
}
#endregion
#region columnCount
[PhpVisible, ImplementsMethod]
public virtual object columnCount(ScriptContext context)
{
if (this.CurrentReader != null)
{
return this.CurrentReader.FieldCount;
}
return -1;
}
[EditorBrowsable(EditorBrowsableState.Never)]
public static object columnCount(object instance, PhpStack stack)
{
stack.RemoveFrame();
return ((PDOStatement)instance).columnCount(stack.Context);
}
#endregion
- davidbcn
- Posts: 87
- Joined: September 10th, 2014, 3:07 am
Re: ColumnCount not implemented
sorry for the delay.
It looks great, I can merge it into sources and push it on github.
Thanks,
It looks great, I can merge it into sources and push it on github.
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests