Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 17 22:14
    dependabot-preview[bot] opened #36
  • Jan 17 22:14
    dependabot-preview[bot] closed #35
  • Jan 16 22:13
    dependabot-preview[bot] opened #35
  • Jan 16 22:12
    dependabot-preview[bot] closed #34
  • Jan 15 22:13
    dependabot-preview[bot] opened #34
  • Jan 15 22:12
    dependabot-preview[bot] closed #33
  • Jan 15 15:30
    Koka closed #129
  • Jan 15 15:30
    Koka commented #129
  • Jan 14 22:13
    dependabot-preview[bot] opened #33
  • Jan 14 22:13
    dependabot-preview[bot] closed #32
  • Jan 14 08:09

    Koka on master

    Update readme (compare)

  • Jan 13 22:13
    dependabot-preview[bot] opened #32
  • Jan 13 22:13
    dependabot-preview[bot] closed #31
  • Jan 10 22:13
    dependabot-preview[bot] opened #31
  • Jan 10 22:11
    dependabot-preview[bot] closed #30
  • Jan 09 22:14
    dependabot-preview[bot] opened #30
  • Jan 09 22:13
    dependabot-preview[bot] closed #29
  • Jan 08 22:13
    dependabot-preview[bot] opened #29
  • Jan 08 22:12
    dependabot-preview[bot] closed #28
  • Jan 07 22:13
    dependabot-preview[bot] opened #28
Yavuz Günay
@yvz5
hi, i just tried the master branch with my db. it has the same problem. the db collation is windows-1252. i cant get the raw data to convert it to utf8 myself
thread 'main' panicked at 'called Result::unwrap() on an Err value: Utf8Error { valid_up_to: 5, error_len: Some(1) }', src\libcore\result.rs:916:5
Yavuz Günay
@yvz5
oh wait i got the raw bytes never mind
Konstantin V. Salikhov
@Koka
Hi, general idea now is to get your varchar column as CString and then parse it using any encoding you want
Yavuz Günay
@yvz5
i just get a byte array and encode it using encoding crate
yekimov
@yekimov
Hi! Today I faced panic when I tried to bind argument with i64 value with MS SQL ODBC driver. The driver said that `State: 22003, Native error: 0, Message: [Microsoft][ODBC Driver 17 for SQL Server]Numeric value out of range thread panicked while processing panic. aborting.'. I looked at source and found out that sql datatype for i64 is SQL_INTEGER. Isn't it a mistake. May be there have to be SQL_NUMERIC instead? Thank you.
Konstantin V. Salikhov
@Koka
Hi, yes this looks like a bug, you could post a GitHub issue or better a pull request with fix if you want.
yekimov
@yekimov
OK, thanks!
yekimov
@yekimov
I found out that sqlite see no difference between different integer types. INTEGER and BIGINT has the same affinity. Therefore I can't write correct test to reproduce bug with sqlite. I saw some tests that reference to PostgresSQL, but I'm not sure I can use it with my tests.
Konstantin V. Salikhov
@Koka
@yekimov I've merged your PR and published it as 0.11.0 - thanks for your contribution!
yekimov
@yekimov
I saw it =) Thank you.
yekimov
@yekimov

Hello again. I faced this at "output.rs":
// As a workaround for drivers that don't include tailing null(s) check if last bytes are null

Is this a real case, or just hypothesis? I've encountered some quirks with zeroes truncation, and I'm curious, can we revise this code part with the "workaround"?

yekimov
@yekimov
All drivers I tried, doesn't insert null-terminator for binary data requests (i.e. ffi::SQL_C_BINARY for target_type argument). I tried it with SQLServer, FreeTDS, SQLite and Postgres odbc drivers. Maybe there is no need to check for null-termination when binary data requested.
Or maybe rewrite null_bytes() for Vec<u8> and &[u8]?
Konstantin V. Salikhov
@Koka
@yekimov All I can tell this fix was related to Koka/odbc-rs#96 and Koka/odbc-rs#106 PRs - looks like https://www.monetdb.org/ odbc driver had some kind of problem in this place. If you have a thought on how to improve code - PR's are always welcome
yekimov
@yekimov
Ok. I'll ask @jpastuszek for clarification of the problem he faced with.
yekimov
@yekimov
I sent you PR.
Konstantin V. Salikhov
@Koka
Released as 0.12.0
yekimov
@yekimov
👍
Daevor
@Daevor

Hi all. I tried getting the code in the readme (github repo) working, but I'm getting this error:

30 | fn execute_statement<'env>(conn: &Connection<'env>) -> Result<()> {
   |                                   ^^^^^^^^^^^^^^^^ expected 1 type argument

Did I miss something simple?

yekimov
@yekimov
Hi Daevor. I think its due to outdated readme. Connection got one type parameter: AutocommitMode. You should change fn signature accordingly to make it work. Something like
fn execute_statement<'env, AC: AutocommitMode>(conn: &Connection<'env, AC>) -> Result<()> {}
Antonio Gelameris
@toniogela_twitter
Hello Guys! Has someone ever tried this library to connect to Vertica?
Konstantin V. Salikhov
@Koka
Looks like @vnnv01 did: Koka/odbc-rs#81