module Prostore::Adapter::SQLite

Defined in:

prostore/adapter/sqlite/adapter.cr
prostore/adapter/sqlite/ddl.cr
prostore/adapter/sqlite/introspect.cr
prostore/adapter/sqlite/rebuild.cr
prostore/adapter/sqlite/types.cr

Constant Summary

AFFINITY = {"int32" => "INTEGER", "int64" => "INTEGER", "float32" => "REAL", "float64" => "REAL", "string" => "TEXT", "bool" => "INTEGER", "time" => "TEXT", "bytes" => "BLOB", "uuid" => "TEXT", "decimal" => "TEXT", "json" => "TEXT"}

Portable type tag → SQLite affinity (ADR-0014, ADR-0007).

SQLite's storage class system means most distinctions get folded: all integers go to INTEGER (stored as 64-bit), both Float32 and Float64 to REAL. We track the portable tag in prostore_schema so the diff engine doesn't lose precision even when SQLite does.

Class Method Summary

Class Method Detail

def self.affinity(portable : String) : String #

[View source]