Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Scaffold Hacksteader postgres methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Muirrum committed Mar 4, 2021
1 parent 8dd2ebc commit 2955a09
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![warn(missing_docs)]

use humantime::{format_rfc3339, parse_rfc3339};
use rusoto_dynamodb::{AttributeValue, DynamoDb, DynamoDbClient};
use std::collections::HashMap;
use std::fmt;
use std::time::SystemTime;
Expand Down
14 changes: 14 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ use crate::config::{ArchetypeHandle, PlantArchetype};
use crate::*;
use serde::Serialize;
use std::time::SystemTime;
use tokio_postgres::Client as PgClient;
use tokio_postgres::error::Error as SqlError;


#[derive(Clone, Debug, Serialize)]
pub struct Hacksteader {
Expand Down Expand Up @@ -48,6 +51,17 @@ pub struct Craft {
pub makes: ArchetypeHandle,
}

impl Hacksteader {
pub async fn insert_to_sql(&self, client: &PgClient) -> Result<(), SqlError> {

Ok(())
}

pub async fn update_in_sql(&self, client: &PgClient) -> Result<(), SqlError> {
Ok(())
}
}

impl std::ops::Deref for Plant {
type Target = PlantArchetype;

Expand Down

0 comments on commit 2955a09

Please sign in to comment.