Type Alias VarChar

Source
pub type VarChar = Text;
Expand description

The SQL VARCHAR type

This type is generally interchangeable with TEXT, so Diesel has this as an alias rather than a separate type (Diesel does not currently support implicit coercions).

One notable exception to this is with arrays on PG. TEXT[] cannot be coerced to VARCHAR[]. It is recommended that you always use TEXT[] if you need a string array on PG.

Aliased Type§

struct VarChar;

Trait Implementations

Source§

impl Clone for Text

Source§

fn clone(&self) -> Text

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Text

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Text

Source§

fn default() -> Text

Returns the “default value” for a type. Read more
Source§

impl QueryId for Text

Source§

const HAS_STATIC_QUERY_ID: bool = true

Can the SQL generated by Self be uniquely identified by its type? Read more
Source§

type QueryId = Text

A type which uniquely represents Self in a SQL query. Read more
Source§

fn query_id() -> Option<TypeId>

Returns the type id of Self::QueryId if Self::HAS_STATIC_QUERY_ID. Returns None otherwise. Read more
Source§

impl SqlType for Text

Source§

type IsNull = NotNull

Is this type nullable? Read more
Source§

impl Copy for Text

Source§

impl SingleValue for Text

Source§

impl SqlOrd for Text