Debian Codegraph @

src/column.rs

raw symbols SCIP
1 use craterust-analyzer cargo sqlx-postgres 0.8.3 crate/::extrust-analyzer cargo sqlx-core 0.8.3 ext/::ustrrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/::UStrrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/UStr#;
2 use craterust-analyzer cargo sqlx-postgres 0.8.3 crate/::{PgTypeInforust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo#, Postgresrust-analyzer cargo sqlx-postgres 0.8.3 database/Postgres#};
3
4 pub(craterust-analyzer cargo sqlx-postgres 0.8.3 crate/) use sqlx_corerust-analyzer cargo sqlx-core 0.8.3 crate/::columnrust-analyzer cargo sqlx-core 0.8.3 column/::{Columnrust-analyzer cargo sqlx-core 0.8.3 column/Column#, ColumnIndexrust-analyzer cargo sqlx-core 0.8.3 column/ColumnIndex#};
5
6 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)]
7 #[cfg_attr(feature = "offline", derive(serderust-analyzer cargo serde 1.0.229 crate/::Serializerust-analyzer cargo serde_derive 1.0.229 Serialize:, serderust-analyzer cargo serde 1.0.229 crate/::Deserializerust-analyzer cargo serde_derive 1.0.229 Deserialize:))]
8 pub struct PgColumnrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn# {
9 pub(craterust-analyzer cargo sqlx-postgres 0.8.3 crate/) ordinalrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#ordinal.: usize,
10 pub(craterust-analyzer cargo sqlx-postgres 0.8.3 crate/) namerust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#name.: UStrrust-analyzer cargo sqlx-core 0.8.3 ext/ustr/UStr#,
11 pub(craterust-analyzer cargo sqlx-postgres 0.8.3 crate/) type_inforust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#type_info.: PgTypeInforust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo#,
12 #[cfg_attr(feature = "offline", serde(skip))]
13 pub(craterust-analyzer cargo sqlx-postgres 0.8.3 crate/) relation_idrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#relation_id.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<craterust-analyzer cargo sqlx-postgres 0.8.3 crate/::typesrust-analyzer cargo sqlx-postgres 0.8.3 types/::Oidrust-analyzer cargo sqlx-postgres 0.8.3 types/oid/Oid#>,
14 #[cfg_attr(feature = "offline", serde(skip))]
15 pub(craterust-analyzer cargo sqlx-postgres 0.8.3 crate/) relation_attribute_norust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#relation_attribute_no.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i16>,
16 }
17
18 impl PgColumnrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn# {
19 /// Returns the OID of the table this column is from, if applicable.
20 ///
21 /// This will be `None` if the column is the result of an expression.
22 ///
23 /// Corresponds to column `attrelid` of the `pg_catalog.pg_attribute` table:
24 /// <https://www.postgresql.org/docs/current/catalog-pg-attribute.html>
25 pub fn relation_idrust-analyzer cargo sqlx-postgres 0.8.3 column/impl#[PgColumn]relation_id().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<craterust-analyzer cargo sqlx-postgres 0.8.3 crate/::typesrust-analyzer cargo sqlx-postgres 0.8.3 types/::Oidrust-analyzer cargo sqlx-postgres 0.8.3 types/oid/Oid#> {
26 self.relation_idrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#relation_id.
27 }
28
29 /// Returns the 1-based index of this column in its parent table, if applicable.
30 ///
31 /// This will be `None` if the column is the result of an expression.
32 ///
33 /// Corresponds to column `attnum` of the `pg_catalog.pg_attribute` table:
34 /// <https://www.postgresql.org/docs/current/catalog-pg-attribute.html>
35 pub fn relation_attribute_norust-analyzer cargo sqlx-postgres 0.8.3 column/impl#[PgColumn]relation_attribute_no().(&self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i16> {
36 self.relation_attribute_norust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#relation_attribute_no.
37 }
38 }
39
40 impl Columnrust-analyzer cargo sqlx-core 0.8.3 column/Column# for PgColumnrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn# {
41 type Databaserust-analyzer cargo sqlx-postgres 0.8.3 column/impl#[PgColumn][Column]Database# = Postgresrust-analyzer cargo sqlx-postgres 0.8.3 database/Postgres#;
42
43 fn ordinalrust-analyzer cargo sqlx-postgres 0.8.3 column/impl#[PgColumn][Column]ordinal().(&self) -> usize {
44 self.ordinalrust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#ordinal.
45 }
46
47 fn namerust-analyzer cargo sqlx-postgres 0.8.3 column/impl#[PgColumn][Column]name().(&self) -> &str {
48 &self.namerust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#name.
49 }
50
51 fn type_inforust-analyzer cargo sqlx-postgres 0.8.3 column/impl#[PgColumn][Column]type_info().(&self) -> &PgTypeInforust-analyzer cargo sqlx-postgres 0.8.3 type_info/PgTypeInfo# {
52 &self.type_inforust-analyzer cargo sqlx-postgres 0.8.3 column/PgColumn#type_info.
53 }
54 }