
| Key: |
COR-15
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Travis Reeder
|
| Votes: |
2
|
| Watchers: |
2
|
|
If you were logged in you would be able to see more operations.
|
|
|
db4o Core
Created: 25/Jul/06 05:50 PM
Updated: 04/Feb/09 04:50 PM
|
|
| Component/s: |
None
|
| Affects Version/s: |
None
|
| Fix Version/s: |
None
|
|
|
public class ClassA{
public StructA s;
public int valueB
}
public struct StructA{
int valueA; //indexed
}
Optimize the above case for:
q.descend("valueB").constrain(14).and(
q.descend("s").descend("valueA").constrain(22));
|
|
Description
|
public class ClassA{
public StructA s;
public int valueB
}
public struct StructA{
int valueA; //indexed
}
Optimize the above case for:
q.descend("valueB").constrain(14).and(
q.descend("s").descend("valueA").constrain(22)); |
Show » |
|
That could be done because struct always reserving memory. Also structure couldn't be inherited. So you can always treat structure fields as a fields of object holding structure. So that you can query in the style
q.descend("s.valueA").constrain(22);
just place struct fields inside object.