[
https://issues.apache.org/jira/browse/DERBY-2535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mamta A. Satoor updated DERBY-2535:
-----------------------------------
Attachment: DERBY2535_Return_Collator_api_On_DVD_v1_stat.txt
DERBY2535_Return_Collator_api_On_DVD_v1_diff.txt
Attaching patch DERBY2535_Return_Collator_api_On_DVD_v1_diff.txt which adds the
api on DVD to return the Collator object depending on the collation type. The
new api looks as follows
RuleBasedCollator getCharacterCollator(int collationType);
If the collation type is UCS_BASIC, then Collator object returned by the new
api above will be null. If the collation type is TERRITORY_BASED, then Collator
object returned will be the one based on the territory of the database.
This new api will be used in a method on DataValueFactory(DVF) which will take
format id and collation type and return a DVD based on those 2 values. That
method on DVF will first consturct a DVD using just the format id. For
character trype format ids, this means that the DVD will always be
SQLChar/SQLVarchar/SQLLongvarchar/SQLClob. This is ok if we are dealing with
collation type of UCS_BASIC. But if the collation type is TERRITORY_BASED, then
we shoould construct a DVD of type
CollatorSQLChar/CollatorSQLVarchar/CollatorSQLLongvarchar/CollatorSQLClob. In
order to construct these collation sensitive DVDs, the method on DVF will call
the new api on DVD (getCharacterCollator) and it will use the return Collator
from getCharacterCollator to construct the right kind of character DVD.
I will commit this patch in next few minutes. Any comments, please let me know.
> Make Locale available in DataValueFactory(DVF). This Locale object will be
> used to construct Collator object if the user has requested territory based
> collation.
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-2535
> URL: https://issues.apache.org/jira/browse/DERBY-2535
> Project: Derby
> Issue Type: New Feature
> Components: SQL
> Affects Versions: 10.3.0.0
> Reporter: Mamta A. Satoor
> Assigned To: Mamta A. Satoor
> Attachments: DERBY2535_Return_Collator_api_On_DVD_v1_diff.txt,
> DERBY2535_Return_Collator_api_On_DVD_v1_stat.txt,
> DERBY2535_Set_Locale_On_DVF_v1_diff.txt,
> DERBY2535_Set_Locale_On_DVF_v1_stat.txt,
> DERBY2535_Set_Locale_On_DVF_v1_stat.txt,
> DERBY2535_Uncomment_locale_setting_on_DVF_v1_diff.txt
>
>
> Add a new api on DVF which will make Locale object available to DVF. This new
> api on DVF will get called by the boot method of BasicDatabase after
> BasicDatabase has finished booting DVF. This Locale will be either the Locale
> obtained from the territory attribute supplied by the user on the JDBC url at
> database create time or if user didn't provide the territory attribute at
> database create time, then it will be set to the default JVM locale. This
> Locale object will be used by DVF to construct the Collator object if user
> has requested territory based collation.
> The new api will look like following
> void setLocale(Locale localeOfTheDatabase);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.