Hey rustacians
how to get the type for the geography point using postgres crate
let create = postgres
.query("SELECT id,location FROM locations;", &[])
.unwrap();
for create in create.iter() {
let id: String = create.get(0);
let location = create.get(1);
}
schema
CREATE TABLE IF NOT EXISTS shop (
id TEXT DEFAULT encode(gen_random_bytes(12),'hex') NOT NULL,
name DATE DEFAULT CURRENT_DATE,
time TIME DEFAULT CURRENT_TIME,
fingerprint TIMESTAMP DEFAULT NOW(),
age INT DEFAULT 24,
place TEXT NOT NULL,
location GEOGRAPHY(POINT,4326) NOT NULL,
PRIMARY KEY (id),
UNIQUE (id,place)
);