User tests: Successful: Unsuccessful:
as per comment on #12348 see #12348 (review)
CAST('field' AS CHAR(n))
castAsChar()
from query.php to each driverthis kind of CAST works now
$query->select($query->castAsChar('field', 40))
$query->select($query->castAsChar('field'))
we can use this type of SQL too
$query->select($query->castAsChar('field', 40))
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Libraries Postgresql |
restored castAsChar()
in JDatabaseQuery
as suggested
I have tested this item
Tested with mysql and postgresql. Thanks!
conflict fixed
The mssql implementation is missing here.
Category | Libraries Postgresql | ⇒ | Libraries Postgresql MS SQL |
Can you change default len for mssql from 10 to 30.
https://msdn.microsoft.com/en-us/library/ms187928.aspx
The default value is 30.
It would be useful for datetime2
which has 19 chars. 0000-00-00 00:00:00
I have tested this item
Thanks!
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-30 21:18:10 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
@alikon Would you mind porting this to the framework package so that it can go into the 4.x branch please - I just realised it's gone missing (issue to track this on framework at joomla-framework/database#157)
You need to keep the base function in
JDatabaseQuery
otherwise if it's used with a subclass not implementing the method you'll end up with a fatal error. Otherwise aside from the CI failures seems fine to me.