development_postgress #11
@@ -131,10 +131,6 @@ WHERE table_name = $1
 | 
			
		||||
 | 
			
		||||
        // If table does not exist set it up
 | 
			
		||||
        if !exists {
 | 
			
		||||
            eprintln!(
 | 
			
		||||
                "Table {} does not exist, create it now",
 | 
			
		||||
                Self::collection_name::<M>()
 | 
			
		||||
            );
 | 
			
		||||
            // Use a transaction here so if index creation failed the table is also not created.
 | 
			
		||||
            let mut tx = con.transaction().map_err(Error::from)?;
 | 
			
		||||
 | 
			
		||||
@@ -241,8 +237,6 @@ where
 | 
			
		||||
                return Err(Error::FailedInsert.into());
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            eprintln!("insert done");
 | 
			
		||||
 | 
			
		||||
            // Get the generated ID
 | 
			
		||||
            let id = row.get::<_, i64>("key") as u32;
 | 
			
		||||
            let mut value = row.get::<_, Json<M>>("value").0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user