Consider the following table structure and its data:
CREATE TABLE test (
id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL PRIMARY KEY,
name VARCHAR(100) NOT NULL UNIQUE
);
INSERT INTO test (name) VALUES ('Fulano');
INSERT INTO test (name) VALUES ('Beltrano');
INSERT INTO test (name) VALUES ('Cicrano');
SELECT * FROM test;
-- ID NAME
-- 1 Fulano
-- 2 Beltrano
-- 3 Cicrano
Now, consider the following example:
use rsfbclient::{Connection, FbError};
fn main() -> Result<(), FbError> {
let conn = Connection::open("localhost", 3050, "test.fdb", "SYSDBA", "masterkey")?;
let tr = conn.transaction()?;
let rows = tr.prepare("SELECT * FROM test")?.query(())?.into_iter();
println!("| ID | NAME |");
println!("| -- | ---- |");
for row in rows {
let (id, name): (i64, String) = row?;
println!("| {} | {} |", id, name);
}
Ok(())
}
P.S.: Changing the column type from i64 to i32 it prints the values properly for short ones, however, it isn't managed to map a full bigint range (-2^63 .. 2^63-1).
Hi.
Consider the following table structure and its data:
Now, consider the following example:
It is returning the following result:
but it should return:
regards,
P.S.: Changing the column type from
i64
toi32
it prints the values properly for short ones, however, it isn't managed to map a full bigint range (-2^63 .. 2^63-1).