|
Hi,
Say I have a Quote object which has dateNo, open, high, low, close instance
variables and each holds an OrderedCollection of data.
Now I've prepared a database with rows of data such as:
date--open--high--low--close
0001--11.1--11.2--10.9-11.1
0002--11.5--11.5--11.0-11.2
0003--11.3--11.9--10.8-10.9
And when I read them from database to aQuote, I want the open variable holds
#(11.1 11.5 11.3) and close holds #(11.1 11.2 10.9), etc.
The question is, when I read from table quotes with:
session prepare: 'SELECT open, close FROM quotes';
bindOutputNamed: Quote new;
execute.
aQuote:= session answer.
aQuote next.
Then I would get a atom object with only one single data for each variable.
Now how can I:
1. get rows of data as a collection into instance variables?
2. specify the rows to read into an object from db?
Thanks!
yours,
jimg
|