pub struct RustSqlMapping {
pub rust: String,
pub sql: String,
pub id: TypeId,
}
Expand description
A mapping from a Rust type to a SQL type, with a TypeId
.
use pgrx_sql_entity_graph::RustSqlMapping;
let constructed = RustSqlMapping::of::<i32>(String::from("int"));
let raw = RustSqlMapping {
rust: core::any::type_name::<i32>().to_string(),
sql: String::from("int"),
id: core::any::TypeId::of::<i32>(),
};
assert_eq!(constructed, raw);
Fields§
§rust: String
§sql: String
§id: TypeId
Implementations§
Trait Implementations§
Source§impl Clone for RustSqlMapping
impl Clone for RustSqlMapping
Source§fn clone(&self) -> RustSqlMapping
fn clone(&self) -> RustSqlMapping
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RustSqlMapping
impl Debug for RustSqlMapping
Source§impl Hash for RustSqlMapping
impl Hash for RustSqlMapping
Source§impl Ord for RustSqlMapping
impl Ord for RustSqlMapping
Source§fn cmp(&self, other: &RustSqlMapping) -> Ordering
fn cmp(&self, other: &RustSqlMapping) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for RustSqlMapping
impl PartialEq for RustSqlMapping
Source§impl PartialOrd for RustSqlMapping
impl PartialOrd for RustSqlMapping
impl Eq for RustSqlMapping
impl StructuralPartialEq for RustSqlMapping
Auto Trait Implementations§
impl Freeze for RustSqlMapping
impl RefUnwindSafe for RustSqlMapping
impl Send for RustSqlMapping
impl Sync for RustSqlMapping
impl Unpin for RustSqlMapping
impl UnwindSafe for RustSqlMapping
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.