-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example shows 0s, instead of the inserted data #13
Comments
If I change the loop to do
so the data is there, but perhaps .get_f64() can not access it 🤔 |
|
Ah yes, sorry. In a recent update (v0.2.4 - #6) to conform to the SQL standard, all regular (non-delimited) identifiers are represented in upper case. I forgot to update the example to be That println(row.get_f64('Foo') ?)
// no such column Foo, did you mean FOO? Alternatively, |
imho returning a helpful error is better - code is written just once, and the error will be caught in development; forcing get_f64 functions to upcase their arguments will happen in production too |
- The `Row` now has new functions for `get_bool`, `get_null` and `get_unknown` for respective value types. - The get methods are sensitive to returning only on the correct types (ie. `get_f64` can only be used on numeric values). - An error is returned from any get method if the column does not exist. - Should a column not exist but there is a column with a different case, a more helpful message is returned like "no such column foo, did you mean FOO?" Fixes #13
- The `Row` now has new functions for `get_bool`, `get_null` and `get_unknown` for respective value types. - The get methods are sensitive to returning only on the correct types (ie. `get_f64` can only be used on numeric values). - An error is returned from any get method if the column does not exist. - Should a column not exist but there is a column with a different case, a more helpful message is returned like "no such column foo, did you mean FOO?" Fixes #13
- The `Row` now has new functions for `get_bool`, `get_null` and `get_unknown` for respective value types. - The get methods are sensitive to returning only on the correct types (ie. `get_f64` can only be used on numeric values). - An error is returned from any get method if the column does not exist. - Should a column not exist but there is a column with a different case, a more helpful message is returned like "no such column foo, did you mean FOO?" Fixes #13
Running the example produces 0, instead of the inserted values:
![image](https://user-images.githubusercontent.com/26967/127114724-f17f600c-3367-419e-9d2a-80b29bd63132.png)
The values are inside the
/tmp/test.vsql
as validated by running thevsql-cli.v
later.The text was updated successfully, but these errors were encountered: