You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Mamta A. Satoor (JIRA)" <ji...@apache.org> on 2007/02/14 19:49:05 UTC

[jira] Updated: (DERBY-2334) Accept the new collation attribute and store it in services.properties file. Will be used for language based collation ordering.

     [ https://issues.apache.org/jira/browse/DERBY-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mamta A. Satoor updated DERBY-2334:
-----------------------------------

    Attachment: DERBY2334_AcceptCollationAttribute_diff_V01.txt
                DERBY2334_AcceptCollationAttribute_stat_V01.txt

As a first step towards DERBY-1478 (Add built in language based ordering and like processing to Derby), I have a patch (DERBY2334_AcceptCollationAttribute_diff_V01.txt) which accepts the collation attribute at database create time and saves it in services.properties file. This value can later be retrieved using VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('collation');

The files impacted by this patch are as follows (also attached as DERBY2334_AcceptCollationAttribute_stat_V01.txt to this Jira entry).
M      java\engine\org\apache\derby\impl\services\monitor\BaseMonitor.java
M      java\engine\org\apache\derby\iapi\services\property\PropertyUtil.java
M      java\engine\org\apache\derby\iapi\reference\Attribute.java
M      java\engine\org\apache\derby\iapi\reference\Property.java
M      java\engine\org\apache\derby\jdbc\Driver20.java
M      java\engine\org\apache\derby\loc\messages.xml
M      java\shared\org\apache\derby\shared\common\reference\SQLState.java
M      java\shared\org\apache\derby\shared\common\reference\MessageId.java
M      java\testing\org\apache\derbyTesting\functionTests\master\GetPropertyInfoTest.out

Patch description is brief
1)Changes in BaseMonitor.java does the job of fetching and validating the collation attribute from the url so that it can be saved in services.properties file. If no collation attribute specified, then it gets initialized to UCS_BASIC.
2)Added collation attribute to the list of properties that get saved in services.properties file. This change went into PropertyUtil.java
3)All the JDBC attributes are defined in Attribute.java. Added collation to that file.
4)The 2 valid values for collation attribute are defined in Property.java. They are UCS_BASIC and TERRITORY_BASED_COLLATION
5)Changes in Driver20 class adds the new string attribute so it can be detected by the generic GUI tools through getPropertyInfo method.***(question at the bottom on this comment)
6)Added new SQLState and message id for new attribute in messages.xml, SQLState.java and MessageId.java
7)Needed to update master GetPropertyInfoTest.out so it is aware of the new collation attribute.

I ran Junit tests and derbyall on Windows XP with Sun's jdk14 and there were no new failures. 

***One question I have is that we don't populate choices for value based JDBC url attributes in jdbc/Driver20.java's getPropertyInfo method). For boolean attributes, we specify the choices as true and false (line 259). We don't specify the valid list of choices for value based attributes. That might be because for the existing value based attributes, there are no specific Derby defined values. For instance, the existing territory attribute can accept many different kinds of values which are defined by ISO-639 adn ISO-3166 and hence we can't really give those choices out through getPropertyInfo method. I am wondering if I should spend the time in specifying the 
2 valid choices for the new collation attribute through getPropertyInfo method. If we decide to do this, we will have to make sure that we maintain that choices list for collation as and when Derby starts supporting new value for collation in future.


> Accept the new collation attribute and store it in services.properties file. Will be used for language based collation ordering.
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2334
>                 URL: https://issues.apache.org/jira/browse/DERBY-2334
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.3.0.0
>            Reporter: Mamta A. Satoor
>         Assigned To: Mamta A. Satoor
>         Attachments: DERBY2334_AcceptCollationAttribute_diff_V01.txt, DERBY2334_AcceptCollationAttribute_stat_V01.txt
>
>
> A user would specify the collation desired (UCS_BASIC or TERRITORY_BASED_COLLATION) through the new jdbc url attribute - collation. This attribute will be used to determine collation ordering for character datatypes,

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.