fun while it lasted
ItemLocation ceased to be the canonical place to store an item's
location. replaced with ItemNote which basically covers the actual use
case but without the enforcing of a location.
@ -465,7 +418,7 @@ impl EntityGateway for PostgresGateway {
forinv_itemininventory.items.0.into_iter(){
matchinv_item{
PgInventoryItemEntity::Individual(item)=>{
letentity=sqlx::query_as::<_,PgItemWithLocation>("select item.id, item.item, item_location.location from item join item_location on item.id = item_location.item where id = $1")
letentity=sqlx::query_as::<_,PgItemEntity>("select item.id, item.item from item where id = $1")
.bind(item)
.fetch_one(&self.pool).await
.map(|item|item.into())
@ -476,7 +429,7 @@ impl EntityGateway for PostgresGateway {
PgInventoryItemEntity::Stacked(items)=>{
letmutstacked_item=Vec::new();
fors_iteminitems{
stacked_item.push(sqlx::query_as::<_,PgItemWithLocation>("select item.id, item.item, item_location.location from item join item_location on item.id = item_location.item where id = $1")
stacked_item.push(sqlx::query_as::<_,PgItemEntity>("select item.id, item.item from item where id = $1")
.bind(s_item)
.fetch_one(&self.pool).await
.map(|item|item.into())
@ -501,7 +454,7 @@ impl EntityGateway for PostgresGateway {
forbank_iteminbank.items.0.into_iter(){
matchbank_item{
PgInventoryItemEntity::Individual(item)=>{
letentity=sqlx::query_as::<_,PgItemWithLocation>("select item.id, item.item, item_location.location from item join item_location on item.id = item_location.item where id = $1")
letentity=sqlx::query_as::<_,PgItemEntity>("select item.id, item.item from item where id = $1")
.bind(item)
.fetch_one(&self.pool).await
.map(|item|item.into())
@ -512,7 +465,7 @@ impl EntityGateway for PostgresGateway {
PgInventoryItemEntity::Stacked(items)=>{
letmutstacked_item=Vec::new();
fors_iteminitems{
stacked_item.push(sqlx::query_as::<_,PgItemWithLocation>("select item.id, item.item, item_location.location from item join item_location on item.id = item_location.item where id = $1")
stacked_item.push(sqlx::query_as::<_,PgItemEntity>("select item.id, item.item from item where id = $1")