Roadblock to custom qualifiers
Roadblock to custom qualifiers
- Subject: Roadblock to custom qualifiers
- From: <email@hidden>
- Date: Wed, 16 Jun 2004 10:43:57 +0200
- Thread-topic: Roadblock to custom qualifiers
Hi!
I have just run into a limitation to ventures of writing custom qualifiers. Some database vendor specific behavior is not exposed by the adaptor though it is used internally.
The precise case I have run into involves fixed width CHAR attributes in an Oracle database. When querrying against such an attribute the SQL generated for an EOKeyValueQualifier pads the passed values using Oracle's RPAD function. This occurs in a method of the OraclePlugin. Yet there is no means of asking the plugin do do the same for custom qualifiers. What I would need, in a subclass of EOSQLExpression, is something along the lines of:
public String padSqlStringForValue(String sqlStringForValue, String keyPath)
{
EOAttribute attribute = entity.attributeForPath(keyPath);
String valueType = attribute.valueType();
if ((valueType != null) && (valueType.startsWith('0'))
{
sqlStringForValue = "RPAD(" + sqlStringForValue+ ", " + attribute.width() + ")";
}
return sqlStringForValue;
}
The actual behavior of this method would need to be dependant on the adaptor/database.
Pierre
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.