mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* EOAccess/EOExpressionArray.m (-[valueForSQLExpression:):
Use _infix instead of @"." and skip if _infix is not set. * EOAccess/EOSQLExpression ([EOSQLExpression-prepareSelectExpressionWithAttributes:]): Set listString for "flattened attributes" for aggregate definitions. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@28408 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e44cedc7e7
commit
db5eb46585
3 changed files with 24 additions and 4 deletions
|
@ -14,6 +14,12 @@
|
|||
(-[schemaBasedQualifierWithRootEntity:]): Ditto.
|
||||
(-[sqlStringForSQLExpression:]): Ditto.
|
||||
(-[dealloc]): Ditto.
|
||||
|
||||
* EOAccess/EOExpressionArray.m (-[valueForSQLExpression:):
|
||||
Use _infix instead of @"." and skip if _infix is not set.
|
||||
* EOAccess/EOSQLExpression
|
||||
([EOSQLExpression-prepareSelectExpressionWithAttributes:]):
|
||||
Set listString for "flattened attributes" for aggregate definitions.
|
||||
|
||||
2009-06-01 Georg Fleischmann <g.fleischmann@vhf.de>
|
||||
|
||||
|
|
|
@ -365,8 +365,8 @@ if it's a string return NO
|
|||
|
||||
relValue = [obj valueForSQLExpression: sqlExpression];
|
||||
|
||||
if (i > 0)
|
||||
[value appendString: @"."];
|
||||
if (i > 0 && _infix)
|
||||
[value appendString: _infix];
|
||||
|
||||
[value appendString: relValue];
|
||||
}
|
||||
|
|
|
@ -684,9 +684,23 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
|
|||
{
|
||||
EOAttribute *attribute = [attributes objectAtIndex: i];
|
||||
|
||||
/* Add non-relationship definitions such as aggregates. */
|
||||
if ([attribute isFlattened])
|
||||
{
|
||||
NSEmitTODO(); //TODO???
|
||||
{
|
||||
NSMutableString *listString = [self listString];
|
||||
NSString *definition = [attribute definition];
|
||||
|
||||
if (definition)
|
||||
{
|
||||
NSRange range = [definition rangeOfString:@"."];
|
||||
|
||||
if (range.length == 0)
|
||||
{
|
||||
[self appendItem: definition
|
||||
toListString: listString];
|
||||
}
|
||||
}
|
||||
|
||||
EOFLOGObjectLevelArgs(@"EOSQLExpression", @"flattened attribute=%@",
|
||||
attribute);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue