You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let table_row:User = User{id:PrimaryKey::default(),username:"mjovanc".to_string(),email:"mjovanc@icloud.com".to_string(),address:"Some Random Address 1".to_string(),};
When setting it to ::default we are saying that we want the database to increment the id field automatically using autoincrement.
The text was updated successfully, but these errors were encountered:
Just thinking of creating a custom field type called
PrimaryKey
to add to a field for exampleid
: https://github.com/njord-rs/njord/blob/master/njord/tests/sqlite_test.rs#L15Some example implementation:
Usage example:
When setting it to ::default we are saying that we want the database to increment the id field automatically using autoincrement.
The text was updated successfully, but these errors were encountered: