Skip to main content

Keyword

Struct Keyword 

Source
pub struct Keyword(/* private fields */);
Expand description

A SQL keyword recognised by the pinned release.

Implementations§

Source§

impl Keyword

Source

pub const ABORT: Keyword

The ABORT keyword.

Source

pub const ACTION: Keyword

The ACTION keyword.

Source

pub const ADD: Keyword

The ADD keyword.

Source

pub const AFTER: Keyword

The AFTER keyword.

Source

pub const ALL: Keyword

The ALL keyword.

Source

pub const ALTER: Keyword

The ALTER keyword.

Source

pub const ALWAYS: Keyword

The ALWAYS keyword.

Source

pub const ANALYZE: Keyword

The ANALYZE keyword.

Source

pub const AND: Keyword

The AND keyword.

Source

pub const AS: Keyword

The AS keyword.

Source

pub const ASC: Keyword

The ASC keyword.

Source

pub const ATTACH: Keyword

The ATTACH keyword.

Source

pub const AUTOINCREMENT: Keyword

The AUTOINCREMENT keyword.

Source

pub const BEFORE: Keyword

The BEFORE keyword.

Source

pub const BEGIN: Keyword

The BEGIN keyword.

Source

pub const BETWEEN: Keyword

The BETWEEN keyword.

Source

pub const BY: Keyword

The BY keyword.

Source

pub const CASCADE: Keyword

The CASCADE keyword.

Source

pub const CASE: Keyword

The CASE keyword.

Source

pub const CAST: Keyword

The CAST keyword.

Source

pub const CHECK: Keyword

The CHECK keyword.

Source

pub const COLLATE: Keyword

The COLLATE keyword.

Source

pub const COLUMN: Keyword

The COLUMN keyword.

Source

pub const COMMIT: Keyword

The COMMIT keyword.

Source

pub const CONFLICT: Keyword

The CONFLICT keyword.

Source

pub const CONSTRAINT: Keyword

The CONSTRAINT keyword.

Source

pub const CREATE: Keyword

The CREATE keyword.

Source

pub const CROSS: Keyword

The CROSS keyword.

Source

pub const CURRENT: Keyword

The CURRENT keyword.

Source

pub const CURRENT_DATE: Keyword

The CURRENT_DATE keyword.

Source

pub const CURRENT_TIME: Keyword

The CURRENT_TIME keyword.

Source

pub const CURRENT_TIMESTAMP: Keyword

The CURRENT_TIMESTAMP keyword.

Source

pub const DATABASE: Keyword

The DATABASE keyword.

Source

pub const DEFAULT: Keyword

The DEFAULT keyword.

Source

pub const DEFERRABLE: Keyword

The DEFERRABLE keyword.

Source

pub const DEFERRED: Keyword

The DEFERRED keyword.

Source

pub const DELETE: Keyword

The DELETE keyword.

Source

pub const DESC: Keyword

The DESC keyword.

Source

pub const DETACH: Keyword

The DETACH keyword.

Source

pub const DISTINCT: Keyword

The DISTINCT keyword.

Source

pub const DO: Keyword

The DO keyword.

Source

pub const DROP: Keyword

The DROP keyword.

Source

pub const EACH: Keyword

The EACH keyword.

Source

pub const ELSE: Keyword

The ELSE keyword.

Source

pub const END: Keyword

The END keyword.

Source

pub const ESCAPE: Keyword

The ESCAPE keyword.

Source

pub const EXCEPT: Keyword

The EXCEPT keyword.

Source

pub const EXCLUDE: Keyword

The EXCLUDE keyword.

Source

pub const EXCLUSIVE: Keyword

The EXCLUSIVE keyword.

Source

pub const EXISTS: Keyword

The EXISTS keyword.

Source

pub const EXPLAIN: Keyword

The EXPLAIN keyword.

Source

pub const FAIL: Keyword

The FAIL keyword.

Source

pub const FILTER: Keyword

The FILTER keyword.

Source

pub const FIRST: Keyword

The FIRST keyword.

Source

pub const FOLLOWING: Keyword

The FOLLOWING keyword.

Source

pub const FOR: Keyword

The FOR keyword.

Source

pub const FOREIGN: Keyword

The FOREIGN keyword.

Source

pub const FROM: Keyword

The FROM keyword.

Source

pub const FULL: Keyword

The FULL keyword.

Source

pub const GENERATED: Keyword

The GENERATED keyword.

Source

pub const GLOB: Keyword

The GLOB keyword.

Source

pub const GROUP: Keyword

The GROUP keyword.

Source

pub const GROUPS: Keyword

The GROUPS keyword.

Source

pub const HAVING: Keyword

The HAVING keyword.

Source

pub const IF: Keyword

The IF keyword.

Source

pub const IGNORE: Keyword

The IGNORE keyword.

Source

pub const IMMEDIATE: Keyword

The IMMEDIATE keyword.

Source

pub const IN: Keyword

The IN keyword.

Source

pub const INDEX: Keyword

The INDEX keyword.

Source

pub const INDEXED: Keyword

The INDEXED keyword.

Source

pub const INITIALLY: Keyword

The INITIALLY keyword.

Source

pub const INNER: Keyword

The INNER keyword.

Source

pub const INSERT: Keyword

The INSERT keyword.

Source

pub const INSTEAD: Keyword

The INSTEAD keyword.

Source

pub const INTERSECT: Keyword

The INTERSECT keyword.

Source

pub const INTO: Keyword

The INTO keyword.

Source

pub const IS: Keyword

The IS keyword.

Source

pub const ISNULL: Keyword

The ISNULL keyword.

Source

pub const JOIN: Keyword

The JOIN keyword.

Source

pub const KEY: Keyword

The KEY keyword.

Source

pub const LAST: Keyword

The LAST keyword.

Source

pub const LEFT: Keyword

The LEFT keyword.

Source

pub const LIKE: Keyword

The LIKE keyword.

Source

pub const LIMIT: Keyword

The LIMIT keyword.

Source

pub const MATCH: Keyword

The MATCH keyword.

Source

pub const MATERIALIZED: Keyword

The MATERIALIZED keyword.

Source

pub const NATURAL: Keyword

The NATURAL keyword.

Source

pub const NO: Keyword

The NO keyword.

Source

pub const NOT: Keyword

The NOT keyword.

Source

pub const NOTHING: Keyword

The NOTHING keyword.

Source

pub const NOTNULL: Keyword

The NOTNULL keyword.

Source

pub const NULL: Keyword

The NULL keyword.

Source

pub const NULLS: Keyword

The NULLS keyword.

Source

pub const OF: Keyword

The OF keyword.

Source

pub const OFFSET: Keyword

The OFFSET keyword.

Source

pub const ON: Keyword

The ON keyword.

Source

pub const OR: Keyword

The OR keyword.

Source

pub const ORDER: Keyword

The ORDER keyword.

Source

pub const OTHERS: Keyword

The OTHERS keyword.

Source

pub const OUTER: Keyword

The OUTER keyword.

Source

pub const OVER: Keyword

The OVER keyword.

Source

pub const PARTITION: Keyword

The PARTITION keyword.

Source

pub const PLAN: Keyword

The PLAN keyword.

Source

pub const PRAGMA: Keyword

The PRAGMA keyword.

Source

pub const PRECEDING: Keyword

The PRECEDING keyword.

Source

pub const PRIMARY: Keyword

The PRIMARY keyword.

Source

pub const QUERY: Keyword

The QUERY keyword.

Source

pub const RAISE: Keyword

The RAISE keyword.

Source

pub const RANGE: Keyword

The RANGE keyword.

Source

pub const RECURSIVE: Keyword

The RECURSIVE keyword.

Source

pub const REFERENCES: Keyword

The REFERENCES keyword.

Source

pub const REGEXP: Keyword

The REGEXP keyword.

Source

pub const REINDEX: Keyword

The REINDEX keyword.

Source

pub const RELEASE: Keyword

The RELEASE keyword.

Source

pub const RENAME: Keyword

The RENAME keyword.

Source

pub const REPLACE: Keyword

The REPLACE keyword.

Source

pub const RESTRICT: Keyword

The RESTRICT keyword.

Source

pub const RETURNING: Keyword

The RETURNING keyword.

Source

pub const RIGHT: Keyword

The RIGHT keyword.

Source

pub const ROLLBACK: Keyword

The ROLLBACK keyword.

Source

pub const ROW: Keyword

The ROW keyword.

Source

pub const ROWS: Keyword

The ROWS keyword.

Source

pub const SAVEPOINT: Keyword

The SAVEPOINT keyword.

Source

pub const SELECT: Keyword

The SELECT keyword.

Source

pub const SET: Keyword

The SET keyword.

Source

pub const TABLE: Keyword

The TABLE keyword.

Source

pub const TEMP: Keyword

The TEMP keyword.

Source

pub const TEMPORARY: Keyword

The TEMPORARY keyword.

Source

pub const THEN: Keyword

The THEN keyword.

Source

pub const TIES: Keyword

The TIES keyword.

Source

pub const TO: Keyword

The TO keyword.

Source

pub const TRANSACTION: Keyword

The TRANSACTION keyword.

Source

pub const TRIGGER: Keyword

The TRIGGER keyword.

Source

pub const UNBOUNDED: Keyword

The UNBOUNDED keyword.

Source

pub const UNION: Keyword

The UNION keyword.

Source

pub const UNIQUE: Keyword

The UNIQUE keyword.

Source

pub const UPDATE: Keyword

The UPDATE keyword.

Source

pub const USING: Keyword

The USING keyword.

Source

pub const VACUUM: Keyword

The VACUUM keyword.

Source

pub const VALUES: Keyword

The VALUES keyword.

Source

pub const VIEW: Keyword

The VIEW keyword.

Source

pub const VIRTUAL: Keyword

The VIRTUAL keyword.

Source

pub const WHEN: Keyword

The WHEN keyword.

Source

pub const WHERE: Keyword

The WHERE keyword.

Source

pub const WINDOW: Keyword

The WINDOW keyword.

Source

pub const WITH: Keyword

The WITH keyword.

Source

pub const WITHOUT: Keyword

The WITHOUT keyword.

Source

pub fn text(self) -> &'static [u8] ⓘ

Returns the canonical upper-case spelling of the keyword.

Source

pub fn may_fall_back(self) -> bool

Returns whether the keyword may stand in for an identifier.

SQLite declares a fallback set so that historical schemas using words like KEY or MATCH as column names keep working. A word outside the set is a hard keyword in every position.

Source§

impl Keyword

Source

pub const JOIN_KEYWORDS: &'static [Keyword]

SQLite’s JOIN_KW token class: the words that introduce a join.

They are hard keywords in the sense that matters to may_fall_back - none appears in the %fallback declaration - and they are still legal names, because the name production accepts the token class directly. Both facts are true at once and the grammar states them separately.

Source

pub fn as_str(self) -> &'static str

Returns the canonical spelling as text, for diagnostics.

Source

pub fn is_join_keyword(self) -> bool

Returns whether the keyword introduces a join.

Source

pub fn may_be_name(self) -> bool

Returns whether the keyword may be written where a name is expected.

This is SQLite’s nm ::= idj | STRING with idj ::= ID|INDEXED|JOIN_KW, so it is the fallback set plus the seven join keywords plus INDEXED. It is the right question for a column declaration, a table or index name, a qualified reference, a window name, and an alias written with AS.

It is the wrong question for the two positions that take ids - a bare alias and a declared type name - which take only Keyword::may_fall_back; see this module’s header for why the two cannot be merged.

Trait Implementations§

Source§

impl Clone for Keyword

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Keyword

Source§

impl Debug for Keyword

Source§

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

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

impl Eq for Keyword

Source§

impl Hash for Keyword

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Keyword

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for Keyword

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for Keyword

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for Keyword

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.