fix: better comment for table oid hashing
This commit is contained in:
parent
36bc15ecc5
commit
b5b35ec3db
1 changed files with 2 additions and 1 deletions
|
|
@ -113,7 +113,8 @@ fn column_to_description(schema: &TableSchema, column: Column) -> anyhow::Result
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Stable random number based on string
|
/// Hashes the table name into single i32 used as a substitute for the table OID
|
||||||
|
/// in the PostgreSQL protocol.
|
||||||
fn table_name_to_oid(table_name: &str) -> i32 {
|
fn table_name_to_oid(table_name: &str) -> i32 {
|
||||||
let mut rng: Pcg64 = Seeder::from(table_name).make_rng();
|
let mut rng: Pcg64 = Seeder::from(table_name).make_rng();
|
||||||
rng.gen::<i32>()
|
rng.gen::<i32>()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue