Skip to main content

IdentifierQuery

Struct IdentifierQuery 

Source
pub struct IdentifierQuery<'a> { /* private fields */ }
Expand description

Query interface for looking up cards by external identifiers.

Implementations§

Source§

impl<'a> IdentifierQuery<'a>

Source

pub fn new(conn: &'a Connection) -> Self

Create a new IdentifierQuery bound to the given connection.

Source

pub fn find_by(&self, column: &str, value: &str) -> Result<Vec<Value>>

Generic find: look up cards whose column in card_identifiers matches value.

Returns full card rows (joined from the cards view).

Returns Err(InvalidArgument) if column is not in KNOWN_ID_COLUMNS.

Source

pub fn get_identifiers(&self, uuid: &str) -> Result<Option<Value>>

Get all known identifiers for a card UUID.

Returns the full card_identifiers row as a JSON object.

Source

pub fn find_by_card_kingdom_etched_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Card Kingdom etched product ID.

Source

pub fn find_by_card_kingdom_foil_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Card Kingdom foil product ID.

Source

pub fn find_by_card_kingdom_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Card Kingdom product ID.

Source

pub fn find_by_cardsphere_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Cardsphere ID.

Source

pub fn find_by_cardsphere_foil_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Cardsphere foil ID.

Source

pub fn find_by_mcm_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MCM (Cardmarket) ID.

Source

pub fn find_by_mcm_meta_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MCM meta ID.

Source

pub fn find_by_mtg_arena_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MTG Arena ID.

Source

pub fn find_by_mtgjson_foil_version_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MTGJSON foil version ID.

Source

pub fn find_by_mtgjson_non_foil_version_id( &self, value: &str, ) -> Result<Vec<Value>>

Find cards by MTGJSON non-foil version ID.

Source

pub fn find_by_mtgjson_v4_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MTGJSON v4 ID.

Source

pub fn find_by_mtgo_foil_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MTGO foil ID.

Source

pub fn find_by_mtgo_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by MTGO ID.

Source

pub fn find_by_multiverse_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Multiverse ID.

Source

pub fn find_by_scryfall_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Scryfall ID.

Source

pub fn find_by_scryfall_card_back_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Scryfall card back ID.

Source

pub fn find_by_scryfall_illustration_id( &self, value: &str, ) -> Result<Vec<Value>>

Find cards by Scryfall illustration ID.

Source

pub fn find_by_scryfall_oracle_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by Scryfall Oracle ID.

Source

pub fn find_by_tcgplayer_etched_product_id( &self, value: &str, ) -> Result<Vec<Value>>

Find cards by TCGplayer etched product ID.

Source

pub fn find_by_tcgplayer_product_id(&self, value: &str) -> Result<Vec<Value>>

Find cards by TCGplayer product ID.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for IdentifierQuery<'a>

§

impl<'a> !Send for IdentifierQuery<'a>

§

impl<'a> !Sync for IdentifierQuery<'a>

§

impl<'a> !UnwindSafe for IdentifierQuery<'a>

§

impl<'a> Freeze for IdentifierQuery<'a>

§

impl<'a> Unpin for IdentifierQuery<'a>

§

impl<'a> UnsafeUnpin for IdentifierQuery<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more