sqlx_core_oldapi/
type_info.rs

1use std::fmt::{Debug, Display};
2
3/// Provides information about a SQL type for the database driver.
4pub trait TypeInfo: Debug + Display + Clone + PartialEq<Self> + Send + Sync {
5    fn is_null(&self) -> bool;
6
7    /// Returns the database system name of the type. Length specifiers should not be included.
8    /// Common type names are `VARCHAR`, `TEXT`, or `INT`. Type names should be uppercase. They
9    /// should be a rough approximation of how they are written in SQL in the given database.
10    fn name(&self) -> &str;
11
12    #[doc(hidden)]
13    fn is_void(&self) -> bool {
14        false
15    }
16}