(YourConnectionPool default executeQuery: ‘select 3 + 4’) first “ a query may returns multiple result sets, now we select the first “ rows “ we request the rows of the result set “ first “ then the first row “ first “ and the first column, this returns the number 7 ”
I can get the results back and inspect them.
Pg3Row doesn't understand first.
If I use a rowsWithColumnNameDictionary, I get an interesting column name: #'?column?'
Is that default postgres behavior, or a textconverter issue?
Stephan
Hello Stephan,
On Wed, 1 Oct 2014, Stephan Eggermont wrote:
(YourConnectionPool default executeQuery: ‘select 3 + 4’) first “ a query may returns multiple result sets, now we select the first “ rows “ we request the rows of the result set “ first “ then the first row “ first “ and the first column, this returns the number 7 ”
I can get the results back and inspect them.
Pg3Row doesn't understand first.
That's a bug in the example. You have to use 'at: 1' instead of 'first'. It should be:
(YourConnectionPool default executeQuery: 'select 3 + 4') first rows first at: 1
If I use a rowsWithColumnNameDictionary, I get an interesting column name: #'?column?'
#rowsWithColumnNameDictionary will only work if you name your columns and ensure that all of them have different names. Here's an example:
(YourConnectionPool default executeQuery: 'select 3 + 4 as "theResult"') first rowsWithColumnNameDictionary first theResult
Levente
Is that default postgres behavior, or a textconverter issue?
Stephan
squeak-dev@lists.squeakfoundation.org