diff --git a/src/table/column.rs b/src/table/column.rs index 7ed0f716..ca739cf4 100644 --- a/src/table/column.rs +++ b/src/table/column.rs @@ -10,6 +10,45 @@ pub struct ColumnDef { } /// All column types +/// +/// | Database Type
([`ColumnType`](https://docs.rs/sea-query/*/sea_query/table/enum.ColumnType.html)) | SQLite
datatype | MySQL
datatype | PostgreSQL
datatype | +/// | --------- | --------- | --------- | --------- | +/// | Char | char | char | char | +/// | String | varchar | varchar | varchar | +/// | Text | text | text | text | +/// | TinyInteger | tinyint | tinyint | smallint | +/// | SmallInteger | smallint | smallint | smallint | +/// | Integer | integer | int | integer | +/// | BigInteger | integer | bigint | bigint | +/// | TinyUnsigned | tinyint | tinyint | smallint | +/// | SmallUnsigned | smallint | smallint | smallint | +/// | Unsigned | integer | int | integer | +/// | BigUnsigned | integer | bigint | bigint | +/// | Float | float | float | real | +/// | Double | double | double | double precision | +/// | Decimal | real | decimal | decimal | +/// | DateTime | datetime_text | datetime | timestamp without time zone | +/// | Timestamp | timestamp_text | timestamp | timestamp | +/// | TimestampWithTimeZone | timestamp_with_timezone_text | timestamp | timestamp with time zone | +/// | Time | time_text | time | time | +/// | Date | date_text | date | date | +/// | Year | N/A | year | N/A | +/// | Interval | N/A | N/A | interval | +/// | Binary | blob | blob | bytea | +/// | VarBinary | varbinary_blob | varbinary | bit varying | +/// | Bit | N/A | bit | bit | +/// | VarBit | N/A | bit | varbit | +/// | Boolean | boolean | bool | bool | +/// | Money | money | money | money | +/// | Json | json_text | json | json | +/// | JsonBinary | jsonb_text | json | jsonb | +/// | Uuid | uuid_text | binary(16) | uuid | +/// | Enum | enum_text | ENUM(...) | ENUM_NAME | +/// | Array | N/A | N/A | DATA_TYPE[] | +/// | Cidr | N/A | N/A | cidr | +/// | Inet | N/A | N/A | inet | +/// | MacAddr | N/A | N/A | macaddr | +/// | LTree | N/A | N/A | ltree | #[non_exhaustive] #[derive(Debug, Clone)] pub enum ColumnType {