Enum SchemaFormat

Source
pub enum SchemaFormat {
    Format1,
    Format2,
    Format3,
    Format4,
}
Expand description

§Schema format number (4 Bytes)

The schema format number is a 4-byte big-endian integer at offset 44. The schema format number is similar to the file format read and write version numbers at offsets 18 and 19 except that the schema format number refers to the high-level SQL formatting rather than the low-level b-tree formatting. Four schema format numbers are currently defined:

  • Format 1 is understood by all versions of Sqlite back to version 3.0.0 (2004-06-18).

  • Format 2 adds the ability of rows within the same table to have a varying number of columns, in order to support the ALTER TABLE … ADD COLUMN functionality. Support for reading and writing format 2 was added in Sqlite version 3.1.3 on 2005-02-20.

  • Format 3 adds the ability of extra columns added by ALTER TABLE … ADD COLUMN to have non-NULL default values. This capability was added in Sqlite version 3.1.4 on 2005-03-11.

  • Format 4 causes Sqlite to respect the DESC keyword on index declarations. (The DESC keyword is ignored in indexes for formats 1, 2, and 3.) Format 4 also adds two new boolean record type values (serial types 8 and 9). Support for format 4 was added in Sqlite 3.3.0 on 2006-01-10.

New database files created by Sqlite use format 4 by default. The legacy_file_format pragma can be used to cause Sqlite to create new database files using format 1. The format version number can be made to default to 1 instead of 4 by setting SQLITE_DEFAULT_FILE_FORMAT=1 at compile-time.

Variants§

§

Format1

§

Format2

§

Format3

§

Format4

Trait Implementations§

Source§

impl Debug for SchemaFormat

Source§

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

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

impl Default for SchemaFormat

Source§

fn default() -> SchemaFormat

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

impl From<&SchemaFormat> for u32

Source§

fn from(value: &SchemaFormat) -> Self

Converts to this type from the input type.
Source§

impl Name for SchemaFormat

Source§

const NAME: &'static str = "SchemaFormat"

Source§

impl PartialEq for SchemaFormat

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u32> for SchemaFormat

Source§

type Error = SqliteError

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

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Eq for SchemaFormat

Source§

impl StructuralPartialEq for SchemaFormat

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> 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, 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.