? Success

User tests: Successful: Unsuccessful:

avatar alikon
alikon
15 Oct 2016

as per comment on #12348 see #12348 (review)

Summary of Changes

  • implemented missing feature for SQL CAST CAST('field' AS CHAR(n))
  • moved the castAsChar() from query.php to each driver

Testing 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))

avatar alikon alikon - open - 15 Oct 2016
avatar alikon alikon - change - 15 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 15 Oct 2016
Category Libraries Postgresql
7702be1 15 Oct 2016 avatar alikon tab
avatar mbabker
mbabker - comment - 15 Oct 2016

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.

avatar alikon
alikon - comment - 16 Oct 2016

restored castAsChar() in JDatabaseQuery as suggested

avatar waader
waader - comment - 27 Dec 2016

I have tested this item successfully on c5711ba

Tested with mysql and postgresql. Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417.

avatar waader waader - test_item - 27 Dec 2016 - Tested successfully
avatar jeckodevelopment
jeckodevelopment - comment - 28 Dec 2016

@alikon Nicola, can you please check the conflicting file?
libraries/joomla/database/query/mysqli.php

avatar alikon alikon - change - 28 Dec 2016
The description was changed
avatar alikon
alikon - comment - 28 Dec 2016

conflict fixed

avatar waader
waader - comment - 26 Feb 2017

The mssql implementation is missing here.

avatar joomla-cms-bot joomla-cms-bot - change - 27 Feb 2017
Category Libraries Postgresql Libraries Postgresql MS SQL
avatar alikon
alikon - comment - 27 Feb 2017

@waader added the mssql part

avatar csthomas
csthomas - comment - 2 Mar 2017

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

avatar waader
waader - comment - 28 Mar 2017

@alikon: is this ready for testing?

a3bad12 28 Mar 2017 avatar alikon msdn
avatar alikon
alikon - comment - 28 Mar 2017

yes now fixed last comment from @csthomas about mssql

avatar waader waader - test_item - 28 Mar 2017 - Tested successfully
avatar waader
waader - comment - 28 Mar 2017

I have tested this item successfully on a3bad12

Thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417.

avatar csthomas csthomas - test_item - 29 Mar 2017 - Tested successfully
avatar csthomas
csthomas - comment - 29 Mar 2017

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.

avatar jeckodevelopment jeckodevelopment - change - 29 Mar 2017
The description was changed
Status Pending Ready to Commit
avatar jeckodevelopment
jeckodevelopment - comment - 29 Mar 2017

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12417.

avatar jeckodevelopment jeckodevelopment - edited - 29 Mar 2017
avatar rdeutz rdeutz - change - 30 Mar 2017
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: ?
avatar rdeutz rdeutz - close - 30 Mar 2017
avatar rdeutz rdeutz - merge - 30 Mar 2017
avatar wilsonge
wilsonge - comment - 7 May 2019

@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)

avatar alikon
alikon - comment - 7 May 2019

went out of my radar i'll try to add #18961 then too

Add a Comment

Login with GitHub to post a comment