-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL - improve CAST with CAST('field' AS CHAR(n)) #12417
Conversation
SQL - improve CAST('field' AS CHAR(n))
SQL - improve CAST('field' AS CHAR(n))
moved castAsChar to the driver
CAST with CAST('field' AS CHAR(n))
tabs again
You need to keep the base function in |
re-added castAsChar() as per comment
restored |
I have tested this item ✅ successfully on c5711ba This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417. |
@alikon Nicola, can you please check the conflicting file? |
travis cs fix
conflict fixed |
The mssql implementation is missing here. |
the mssql castAsChar()
@waader added the mssql part |
Can you change default len for mssql from 10 to 30. https://msdn.microsoft.com/en-us/library/ms187928.aspx
It would be useful for |
@alikon: is this ready for testing? |
yes now fixed last comment from @csthomas about mssql |
I have tested this item ✅ successfully on a3bad12 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417. |
I have tested this item ✅ successfully on a3bad12 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417. |
@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) |
went out of my radar i'll try to add #18961 then too |
as per comment on #12348 see #12348 (review)
Summary of Changes
CAST('field' AS CHAR(n))
castAsChar()
from query.php to each driverTesting Instructions
this kind of CAST works now
$query->select($query->castAsChar('field', 40))
$query->select($query->castAsChar('field'))
Documentation Changes Required
we can use this type of SQL too
$query->select($query->castAsChar('field', 40))