|
|
@ -318,10 +318,6 @@ impl EntityGateway for PostgresGateway { |
|
|
|
}
|
|
|
|
|
|
|
|
async fn get_items_by_character(&self, char: &CharacterEntity) -> Vec<ItemEntity> {
|
|
|
|
let q = r#"select item.id, item_location.location, item.item from item_location
|
|
|
|
join item on item.id = item_location.item
|
|
|
|
where cast (location -> 'Inventory' ->> 'character_id' as integer) = $1
|
|
|
|
or cast (location -> 'Bank' ->> 'character_id' as integer) = $1"#;
|
|
|
|
let q = r#"select * from (
|
|
|
|
select distinct on (item_location.item) item.id, item_location.location, item.item
|
|
|
|
from item_location join item on item.id = item_location.item
|
|
|
|