両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
rust:diesel [2024/05/22 06:22] – [RDBMS スキーマーから src/schema.rs を生成する] ともやん | rust:diesel [2024/06/04 17:41] (現在) – [データベース データ型との対応関係のヒント] ともやん |
---|
本家: [[https://diesel.rs/|Diesel is a Safe, Extensible ORM and Query Builder for Rust]]\\ | 本家: [[https://diesel.rs/|Diesel is a Safe, Extensible ORM and Query Builder for Rust]]\\ |
ソースコード: [[git>diesel-rs/diesel|diesel-rs/diesel: A safe, extensible ORM and Query Builder for Rust]]\\ | ソースコード: [[git>diesel-rs/diesel|diesel-rs/diesel: A safe, extensible ORM and Query Builder for Rust]]\\ |
| マイグレーションガイド: [[https://diesel.rs/guides/migration_guide.html|Diesel 2.0 migration guide]]\\ |
===== インストール ===== | ===== インストール ===== |
公式: [[https://diesel.rs/guides/getting-started|Getting Started with Diesel]]\\ | 公式: [[https://diesel.rs/guides/getting-started|Getting Started with Diesel]]\\ |
| |
===== データベース ===== | ===== データベース ===== |
[[linux:podman:piwigo|Piwigo - オープンソースの写真管理 Web アプリ]] を使用する😅\\ | **PostgreSQL**\\ |
| [[linux:podman:postgres|PostgreSQL]] (Podman)\\ |
| |
| **MariaDB**\\ |
| [[linux:podman:piwigo|Piwigo - オープンソースの写真管理 Web アプリ]] (Podman) を使用する😅\\ |
| |
| **SQLite**\\ |
| 構築の必要はない\\ |
| |
===== ワークスペースの作成 ===== | ===== ワークスペースの作成 ===== |
</pre></html></WRAP> | </pre></html></WRAP> |
<WRAP color_result_long><html><pre class=Bat> | <WRAP color_result_long><html><pre class=Bat> |
Unsigned<PiwigoImagesIdMediumint> is not recognized. Please feel free to expand the HashMap. This could provide good hints: https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html | Unsigned<PiwigoImagesIdMediumint> is not recognized. Please feel free to expand the HashMap. This could provide good hints: <a href="https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html">https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html</a> |
Nullable<Unsigned<PiwigoImagesFilesizeMediumint>> is not recognized. Please feel free to expand the HashMap. This could provide good hints: https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html | Nullable<Unsigned<PiwigoImagesFilesizeMediumint>> is not recognized. Please feel free to expand the HashMap. This could provide good hints: <a href="https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html">https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html</a> |
Nullable<Unsigned<Float>> is not recognized. Please feel free to expand the HashMap. This could provide good hints: https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html | Nullable<Unsigned<Float>> is not recognized. Please feel free to expand the HashMap. This could provide good hints: https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html |
Unsigned<PiwigoImagesAddedByMediumint> is not recognized. Please feel free to expand the HashMap. This could provide good hints: https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html | Unsigned<PiwigoImagesAddedByMediumint> is not recognized. Please feel free to expand the HashMap. This could provide good hints: <a href="https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html">https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html</a> |
<font color="#75715E">// Generated by diesel_ext</font> | <font color="#75715E">// Generated by diesel_ext</font> |
| |
</WRAP> | </WRAP> |
| |
| === データベース データ型との対応関係のヒント === |
| <html><script> |
| function formatBigInt(bigint) { |
| return bigint.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
| } |
| </script> |
| <style> |
| th { |
| background-color: #eee; |
| } |
| .xtern_xtrn { |
| |
| } |
| </style></html> |
| <WRAP mintbl minfont_12> |
| 参考: [[https://dev.mysql.com/doc/refman/8.0/en/integer-types.html|MySQL :: MySQL 8.0 Reference Manual :: 13.1.2 Integer Types (Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT]]\\ |
| ^ タイプ ^ ストレージ (Bytes) ^ 符号付き最小値 ^ 符号なしの最小値 ^ 符号付き最大値 ^^ 符号なしの最大値 ^^ |
| | TINYINT | 1 | -128 | 0 | 127 | | 255 | | |
| | SMALLINT | 2 | -32,768 | 0 | 32,767 | | 65,535 | | |
| | MEDIUMINT | 3 | -8,388,608 | 0 | 8,388,607 | | 16,777,215 | | |
| | INT | 4 | -2,147,483,648 | 0 | 2,147,483,647 | | 4,294,967,295 | | |
| | BIGINT | 8 | -263 | 0 | <html><script>document.write(formatBigInt(2n ** 63n -1n))</script></html> | 2<html><sup>63</sup></html>-1 | <html><script>document.write(formatBigInt(2n ** 64n -1n))</script></html> | 2<html><sup>64</sup></html>-1 | |
| </WRAP> |
| <WRAP mintbl minfont_12> |
| [[https://docs.diesel.rs/master/diesel/sql_types/|diesel::sql_types - Rust]]\\ |
| [[https://docs.rs/min_max_traits/latest/min_max_traits/|min_max_traits - Rust]]\\ |
| ^ 符号なし整数型 ^^^^^ |
| ^ タイプ ^ 最小値 ^^ 最大値 ^^ |
| | u8 | 0 || <html><script>document.write(formatBigInt(2n ** 8n -1n))</script></html> | 2<html><sup>8</sup></html>-1 | |
| | u16 | 0 || <html><script>document.write(formatBigInt(2n ** 16n -1n))</script></html> | 2<html><sup>16</sup></html>-1 | |
| | u32 | 0 || <html><script>document.write(formatBigInt(2n ** 32n -1n))</script></html> | 2<html><sup>32</sup></html>-1 | |
| | u64 | 0 || <html><script>document.write(formatBigInt(2n ** 64n -1n))</script></html> | 2<html><sup>64</sup></html>-1 | |
| | u128 | 0 || <WRAP minfont9><html><script>document.write(formatBigInt(2n ** 128n -1n))</script></html></WRAP> | 2<html><sup>128</sup></html>-1 | |
| ^ 符号付き 2 の補数整数型 ^^^^^ |
| ^ タイプ ^ 最小値 ^^ 最大値 ^^ |
| | i8 | <html><script>document.write(formatBigInt(-(2n ** 7n)))</script></html> | -(2<html><sup>7</sup></html>) | <html><script>document.write(formatBigInt(2n ** 7n -1n))</script></html> | 2<html><sup>7</sup></html>-1 | |
| | i16 | <html><script>document.write(formatBigInt(-(2n ** 15n)))</script></html> | -(2<html><sup>15</sup></html>) | <html><script>document.write(formatBigInt(2n ** 15n -1n))</script></html> | 2<html><sup>15</sup></html>-1 | |
| | i32 | <html><script>document.write(formatBigInt(-(2n ** 31n)))</script></html> | -(2<html><sup>31</sup></html>) | <html><script>document.write(formatBigInt(2n ** 31n -1n))</script></html> | 2<html><sup>31</sup></html>-1 | |
| | i64 | <html><script>document.write(formatBigInt(-(2n ** 63n)))</script></html> | -(2<html><sup>63</sup></html>) | <html><script>document.write(formatBigInt(2n ** 63n -1n))</script></html> | 2<html><sup>63</sup></html>-1 | |
| | i128 | <WRAP minfont9><html><script>document.write(formatBigInt(-(2n ** 127n)))</script></html></WRAP> | -(2<html><sup>127</sup></html>) | <WRAP minfont9><html><script>document.write(formatBigInt(2n ** 127n -1n))</script></html></WRAP> | 2<html><sup>127</sup></html>-1 | |
| </WRAP> |
| |
| [[https://gist.github.com/steveh/7c7145409a5eed6b698ee8b609b6d1fc|postgresql-diesel-rust-types.md]]\\ |
| <WRAP mintbl minfont_12> |
| ^ PostgreSQL Type ^ PostgreSQL Size ^ Description ^ Range ^ Diesel Type ^ Rust Type ^ |
| | Nullable Types | | nullable | | [[http://docs.diesel.rs/diesel/sql_types/struct.Nullable.html|Nullable]]<T> | [[https://doc.rust-lang.org/std/option/enum.Option.html|Option]]<T> | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-numeric.html|Numeric Types]] ^^^^^^ |
| | smallint, int2 | 2 bytes | signed integer | -32768 to +32767 | [[http://docs.diesel.rs/diesel/sql_types/struct.SmallInt.html|SmallInt]] | [[https://doc.rust-lang.org/std/primitive.i16.html|i16]] | |
| | integer, int, int4 | 4 bytes | signed integer | -2147483648 to +2147483647 | [[http://docs.diesel.rs/diesel/sql_types/struct.Integer.html|Integer]] | [[https://doc.rust-lang.org/std/primitive.i32.html|i32]] | |
| | bigint, int8 | 8 bytes | signed integer | -9223372036854775808 to +9223372036854775807 | [[http://docs.diesel.rs/diesel/sql_types/struct.BigInt.html|BigInt]] | [[https://doc.rust-lang.org/std/primitive.i64.html|i64]] | |
| | numeric(p, s), decimal(p, s) | 2 bytes per 4 digits + 3 to 8 bytes | exact numeric of selectable precision | 131072.16383 digits | [[http://docs.diesel.rs/diesel/sql_types/struct.Numeric.html|Numeric]] | [[http://docs.diesel.rs/bigdecimal/struct.BigDecimal.html|bigdecimal::BigDecimal]] | |
| | real, float4 | 4 bytes | single precision floating-point number | 6 digits precision | [[http://docs.diesel.rs/diesel/sql_types/struct.Float.html|Float]] | [[https://doc.rust-lang.org/std/primitive.f32.html|f32]] | |
| | double precision, float8 | 8 bytes | double precision floating-point number | 15 digits precision | [[http://docs.diesel.rs/diesel/sql_types/struct.Double.html|Double]] | [[https://doc.rust-lang.org/std/primitive.f64.html|f64]] | |
| | smallserial, serial2 | 2 bytes | autoincrementing integer | 1 to 32767 | [[http://docs.diesel.rs/diesel/sql_types/struct.SmallInt.html|SmallInt]] | [[https://doc.rust-lang.org/std/primitive.i16.html|i16]] | |
| | serial, serial4 | 4 bytes | autoincrementing integer | 1 to 2147483647 | [[http://docs.diesel.rs/diesel/sql_types/struct.Integer.html|Integer]] | [[https://doc.rust-lang.org/std/primitive.i32.html|i32]] | |
| | bigserial, serial8 | 8 bytes | autoincrementing integer | 1 to 9223372036854775807 | [[http://docs.diesel.rs/diesel/sql_types/struct.BigInt.html|BigInt]] | [[https://doc.rust-lang.org/std/primitive.i64.html|i64]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-money.html|Monetary Types]] ^^^^^^ |
| | money | 8 bytes | currency amount | -92233720368547758.08 to +92233720368547758.07 | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Money.html|Money]] | [[http://docs.diesel.rs/diesel/pg/data_types/struct.Cents.html|Cents]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-character.html|Character Types]] ^^^^^^ |
| | character varying(n), varchar(n) | n+1 or n+4 bytes | variable-length character string | | [[http://docs.diesel.rs/diesel/sql_types/struct.Text.html|Text]] | [[https://doc.rust-lang.org/std/string/struct.String.html|String]], &[[https://doc.rust-lang.org/std/primitive.str.html|str]] | |
| | character(n), char(n) | n+1 or n+4 bytes | fixed-length character string | | [[http://docs.diesel.rs/diesel/sql_types/struct.Text.html|Text]] | [[https://doc.rust-lang.org/std/string/struct.String.html|String]], &[[https://doc.rust-lang.org/std/primitive.str.html|str]] | |
| | text | n+1 or n+4 bytes | variable-length character string | | [[http://docs.diesel.rs/diesel/sql_types/struct.Text.html|Text]] | [[https://doc.rust-lang.org/std/string/struct.String.html|String]], &[[https://doc.rust-lang.org/std/primitive.str.html|str]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-binary.html|Binary Data Types]] ^^^^^^ |
| | bytea | n+1 to n+4 bytes | binary data ("byte array") | | [[http://docs.diesel.rs/diesel/sql_types/struct.Binary.html|Binary]] | [[https://doc.rust-lang.org/std/vec/struct.Vec.html|Vec]]<[[https://doc.rust-lang.org/std/primitive.u8.html|u8]]>, &[[https://doc.rust-lang.org/std/primitive.u8.html|u8]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-datetime.html|Date/Time Types]] ^^^^^^ |
| | timestamp, timestamp(p) without time zone | 8 bytes | date and time of day | 4713 BC to 294276 AD, 1 microsecond | [[http://docs.diesel.rs/diesel/sql_types/struct.Timestamp.html|Timestamp]] | [[http://docs.diesel.rs/chrono/naive/struct.NaiveDateTime.html|chrono::NaiveDateTime]] | |
| | timestamptz, timestamp(p) with time zone | 8 bytes | date and time of day, with time zone | 4713 BC to 294276 AD, 1 microsecond | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Timestamptz.html|Timestamptz]] | [[http://docs.diesel.rs/chrono/struct.DateTime.html|chrono::DateTime]] | |
| | date | 4 bytes | calendar date (year, month, day) | 4713 BC to 5874897 AD, 1 day | [[http://docs.diesel.rs/diesel/sql_types/struct.Date.html|Date]] | [[http://docs.diesel.rs/chrono/naive/struct.NaiveDate.html|chrono::NaiveDate]] | |
| | time, time(p) without time zone | 8 bytes | time of day (no date) | 00:00:00 to 24:00:00, 1 microsecond | [[http://docs.diesel.rs/diesel/sql_types/struct.Time.html|Time]] | [[http://docs.diesel.rs/chrono/naive/struct.NaiveTime.html|chrono::NaiveTime]] | |
| | timetz, time(p) with time zone | 12 bytes | time of day (no date), with time zone | 00:00:00+1459 to 24:00:00-1459, 1 microsecond | | |
| | interval(fields)(p) | 16 bytes | time span | -178000000 years to 178000000 years, 1 microsecond | [[http://docs.diesel.rs/diesel/sql_types/struct.Interval.html|Interval]] | [[http://docs.diesel.rs/diesel/pg/data_types/struct.PgInterval.html|PgInterval]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-boolean.html|Boolean Type]] ^^^^^^ |
| | boolean, bool | 1 byte | logical Boolean (true/false) | | [[http://docs.diesel.rs/diesel/sql_types/struct.Bool.html|Bool]] | [[https://doc.rust-lang.org/std/primitive.bool.html|bool]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-geometric.html|Geometric Types]] ^^^^^^ |
| | point (x,y) | 16 bytes | geometric point on a plane | | |
| | line {A,B,C} | 32 bytes | infinite line on a plane | | |
| | lseg ((x1,y1),(x2,y2)) | 32 bytes | finite line segment on a plane | | |
| | box ((x1,y1),(x2,y2)) | 32 bytes | rectangular box on a plane | | |
| | path ((x1,y1),...) | 16+16n bytes | closed geometric path on a plane | | |
| | path [(x1,y1),...] | 16+16n bytes | open geometric path on a plane | | |
| | polygon ((x1,y1),...) | 40+16n bytes | closed geometric path on a plane | | |
| | circle <(x,y),r\> | 24 bytes | circle on a plane | | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-net-types.html|Network Address Types]] ^^^^^^ |
| | cidr | 7 or 19 bytes | IPv4 or IPv6 network address | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Cidr.html|Cidr]] | [[http://docs.diesel.rs/ipnetwork/enum.IpNetwork.html|ipnetwork::IpNetwork]] | |
| | inet | 7 or 19 bytes | IPv4 or IPv6 host address | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Inet.html|Inet]] | [[http://docs.diesel.rs/ipnetwork/enum.IpNetwork.html|ipnetwork::IpNetwork]] | |
| | macaddr | 6 bytes | MAC address | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.MacAddr.html|MacAddr]] | %%[%%[[https://doc.rust-lang.org/std/primitive.u8.html|u8]]; 6] | |
| | macaddr8 | 8 bytes | MAC address (EUI-64 format) | | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-enum.html|Enumerated Types]] ^^^^^^ |
| | enum | 4 bytes | enumerated value | | (user-defined) | [[https://doc.rust-lang.org/std/string/struct.String.html|String]], [[https://doc.rust-lang.org/book/first-edition/enums.html|enum]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-bit.html|Bit String Types]] ^^^^^^ |
| | bit(n) | 1 byte per 8 bits + 5 or 8 bytes | fixed-length bit string | | |
| | bit varying(n), varbit | 1 byte per 8 bits + 5 or 8 bytes | variable-length bit string | | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-textsearch.html|Text Search Types]] ^^^^^^ |
| | tsvector | | text search document | | TsVector | |
| | tsquery | | text search query | | TsQuery | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-uuid.html|UUID Type]] ^^^^^^ |
| | uuid | 16 bytes | universally unique identifier | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Uuid.html|Uuid]] | [[https://docs.rs/uuid/0.5.1/uuid/struct.Uuid.html|uuid::Uuid]] | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-xml.html|XML Type]] ^^^^^^ |
| | xml | | XML data | | |
| ^ [[https://www.postgresql.org/docs/current/static/datatype-json.html|JSON Types]] ^^^^^^ |
| | json | | textual JSON data | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Json.html|Json]] | [[http://docs.diesel.rs/serde_json/value/enum.Value.html|serde_json::Value]] | |
| | jsonb | | binary JSON data, decomposed | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Jsonb.html|Jsonb]] | [[http://docs.diesel.rs/serde_json/value/enum.Value.html|serde_json::Value]] | |
| ^ [[https://www.postgresql.org/docs/current/static/arrays.html|Arrays]] ^^^^^^ |
| | t[] | | array of values | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Array.html|Array]]<T> | [[https://doc.rust-lang.org/std/vec/struct.Vec.html|Vec]]<T>, [[https://doc.rust-lang.org/std/vec/struct.Vec.html|Vec]]<[[https://doc.rust-lang.org/std/option/enum.Option.html|Option]]<T>>, &[T], &%%[%%[[https://doc.rust-lang.org/std/option/enum.Option.html|Option]]<T>] | |
| ^ [[https://www.postgresql.org/docs/current/static/rangetypes.html|Range Types]] ^^^^^^ |
| | int4range | | range of integer | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html|Range]]<[[http://docs.diesel.rs/diesel/sql_types/struct.Integer.html|Integer]]> | ([[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[https://doc.rust-lang.org/std/primitive.i32.html|i32]]>, [[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[https://doc.rust-lang.org/std/primitive.i32.html|i32]]>) |
| | int8range | | range of bigint | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html|Range]]<[[http://docs.diesel.rs/diesel/sql_types/struct.BigInt.html|BigInt]]> | ([[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[https://doc.rust-lang.org/std/primitive.i64.html|i64]]>, [[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[https://doc.rust-lang.org/std/primitive.i64.html|i64]]>) |
| | numrange | | range of numeric | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html|Range]]<[[http://docs.diesel.rs/diesel/sql_types/struct.Numeric.html|Numeric]]> | ([[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/bigdecimal/struct.BigDecimal.html|bigdecimal::BigDecimal]]>, [[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/bigdecimal/struct.BigDecimal.html|bigdecimal::BigDecimal]]>) |
| | tsrange | | range of timestamp | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html|Range]]<[[http://docs.diesel.rs/diesel/sql_types/struct.Timestamp.html|Timestamp]]> | ([[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/chrono/naive/struct.NaiveDateTime.html|chrono::NaiveDateTime]]>, [[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/chrono/naive/struct.NaiveDateTime.html|chrono::NaiveDateTime]]>) |
| | tstzrange | | range of timestamptz | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html|Range]]<[[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Timestamptz.html|Timestamptz]]> | ([[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/chrono/struct.DateTime.html|chrono::DateTime]]>, [[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/chrono/struct.DateTime.html|chrono::DateTime]]>) |
| | daterange | | range of date | | [[http://docs.diesel.rs/diesel/pg/types/sql_types/struct.Range.html|Range]]<[[http://docs.diesel.rs/diesel/sql_types/struct.Date.html|Date]]> | ([[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/chrono/naive/struct.NaiveDate.html|chrono::NaiveDate]]>, [[https://doc.rust-lang.org/std/collections/enum.Bound.html|Bound]]<[[http://docs.diesel.rs/chrono/naive/struct.NaiveDate.html|chrono::NaiveDate]]>) | |
| </WRAP> |
=== 参考文献 === | === 参考文献 === |
[[so>questions/70410103/how-to-make-diesel-auto-generate-models|rust - How to make Diesel auto-generate models? - Stack Overflow]] [[gtr>https://stackoverflow.com/questions/70410103/how-to-make-diesel-auto-generate-models|翻訳]]\\ | [[so>questions/70410103/how-to-make-diesel-auto-generate-models|rust - How to make Diesel auto-generate models? - Stack Overflow]] [[gtr>https://stackoverflow.com/questions/70410103/how-to-make-diesel-auto-generate-models|翻訳]]\\ |
| [[https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html|A comprehensive mapping of PostgreSQL, Diesel, and Rust types]]\\ |
| |