njord-rs / njord

A versatile, feature-rich Rust ORM ⛵
https://njord.rs
BSD 3-Clause "New" or "Revised" License
409 stars 21 forks source link

resolves #74 - Implements primary keys as a specific type #131

Closed chaseWillden closed 1 month ago

chaseWillden commented 1 month ago

Implements the code recommended from here: https://github.com/mjovanc/njord/issues/74.

Implements std::str::FromStr for PrimaryKey Implements std::fmt::Display for PrimaryKey

vercel[bot] commented 1 month ago

@chaseWillden is attempting to deploy a commit to the Marcus Cvjeticanin Team on Vercel.

A member of the Team first needs to authorize it.

chaseWillden commented 1 month ago

@mjovanc, as a side, if you recreate your neo.db table, I'd probably change:

id TEXT PRIMARY KEY,
neo_reference_id TEXT

to

id INTEGER PRIMARY KEY,
neo_reference_id INTEGER
mjovanc commented 1 month ago

@chaseWillden Thanks for the PR. LGTM. However the code inside njord_examples will be changed at a later point. Need to fix the id field in the proc macro first.

But thanks a lot for the help!