//! Attribute markers for `PostgresTable` derive macro.
//!
//! These const markers are used within `#[column(...)]` and `#[PostgresTable(...)]`
//! attributes. Import them from the prelude to get IDE hover documentation.
//!
//! # Example
//! ```rust
//! # extern crate self as drizzle;
//! # mod _drizzle {
//! #     pub mod core { pub use drizzle_core::*; }
//! #     pub mod error { pub use drizzle_core::error::*; }
//! #     pub mod types { pub use drizzle_types::*; }
//! #     pub mod migrations { pub use drizzle_migrations::*; }
//! #     pub use drizzle_types::Dialect;
//! #     pub use drizzle_types as ddl;
//! #     pub mod postgres {
//! #         pub mod values { pub use drizzle_postgres::values::*; }
//! #         pub mod traits { pub use drizzle_postgres::traits::*; }
//! #         pub mod common { pub use drizzle_postgres::common::*; }
//! #         pub mod attrs { pub use drizzle_postgres::attrs::*; }
//! #         pub mod builder { pub use drizzle_postgres::builder::*; }
//! #         pub mod helpers { pub use drizzle_postgres::helpers::*; }
//! #         pub mod expr { pub use drizzle_postgres::expr::*; }
//! #         pub mod types { pub use drizzle_postgres::types::*; }
//! #         pub struct Row;
//! #         impl Row {
//! #             pub fn get<'a, I, T>(&'a self, _: I) -> T { unimplemented!() }
//! #             pub fn try_get<'a, I, T>(&'a self, _: I) -> Result<T, Box<dyn std::error::Error + Sync + Send>> { unimplemented!() }
//! #         }
//! #         pub mod prelude {
//! #             pub use drizzle_macros::{PostgresTable, PostgresSchema, PostgresIndex};
//! #             pub use drizzle_postgres::attrs::*;
//! #             pub use drizzle_postgres::common::PostgresSchemaType;
//! #             pub use drizzle_postgres::traits::{PostgresColumn, PostgresTable};
//! #             pub use drizzle_postgres::values::{PostgresInsertValue, PostgresUpdateValue, PostgresValue};
//! #             pub use drizzle_core::*;
//! #         }
//! #     }
//! # }
//! # pub use _drizzle::*;
//! # pub use const_format;
//! fn main() {
//! use drizzle::postgres::prelude::*;
//!
//! #[PostgresTable(NAME = "users")]
//! struct User {
//!     #[column(PRIMARY, SERIAL)]
//!     id: i32,
//!     #[column(UNIQUE)]
//!     email: String,
//!     metadata: String,
//! }
//! }
//! ```

/// Marker struct for column constraint attributes.
#[derive(Debug, Clone, Copy)]
pub struct ColumnMarker;

//------------------------------------------------------------------------------
// Primary Key Constraints
//------------------------------------------------------------------------------

/// Marks this column as the PRIMARY KEY.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(PRIMARY)]
/// id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-PRIMARY-KEYS>
pub const PRIMARY: ColumnMarker = ColumnMarker;

/// Alias for [`PRIMARY`].
pub const PRIMARY_KEY: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Auto-increment Types
//------------------------------------------------------------------------------

/// Creates a SERIAL column (auto-incrementing 32-bit integer).
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(PRIMARY, SERIAL)]
/// id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL>
pub const SERIAL: ColumnMarker = ColumnMarker;

/// Creates a BIGSERIAL column (auto-incrementing 64-bit integer).
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(PRIMARY, BIGSERIAL)]
/// id: i64,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL>
pub const BIGSERIAL: ColumnMarker = ColumnMarker;

/// Creates a SMALLSERIAL column (auto-incrementing 16-bit integer).
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(PRIMARY, SMALLSERIAL)]
/// id: i16,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL>
pub const SMALLSERIAL: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Uniqueness Constraints
//------------------------------------------------------------------------------

/// Adds a UNIQUE constraint to this column.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(UNIQUE)]
/// email: String,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS>
pub const UNIQUE: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Identity Columns
//------------------------------------------------------------------------------

/// Creates a GENERATED IDENTITY column with configurable mode.
///
/// ## Syntax
/// - `identity(always)` - User values rejected unless OVERRIDING SYSTEM VALUE
/// - `identity(by_default)` - User values take precedence
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// // GENERATED ALWAYS AS IDENTITY - strictest mode
/// #[column(identity(always), primary)]
/// id: i64,
///
/// // GENERATED BY DEFAULT AS IDENTITY - allows override
/// #[column(identity(by_default), primary)]
/// id: i64,
/// # "####;
/// ```
///
/// ## Technical Details
/// `PostgreSQL`'s identity columns are SQL-standard compliant, unlike SERIAL.
/// Use ALWAYS for auto-generated IDs, BY DEFAULT when you need to occasionally set values.
///
/// See: <https://www.postgresql.org/docs/current/ddl-identity-columns.html>
pub const IDENTITY: ColumnMarker = ColumnMarker;

/// Marks a column as a GENERATED AS (expression) column.
///
/// ## Syntax
/// - `generated(stored, "expression")` - Computed on write, stored on disk
/// - `generated(virtual, "expression")` - Computed on read, not stored (`PostgreSQL` 17+)
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(generated(stored, "price * quantity"))]
/// total: i32,
///
/// #[column(generated(virtual, "first_name || ' ' || last_name"))]
/// full_name: String,
/// # "####;
/// ```
///
/// ## Technical Details
/// Generated columns cannot be written to directly.
/// STORED columns are computed and stored on write.
/// VIRTUAL columns are computed on read (`PostgreSQL` 17+).
///
/// See: <https://www.postgresql.org/docs/current/ddl-generated-columns.html>
pub const GENERATED: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Serialization Modes
//------------------------------------------------------------------------------

/// Enables JSON serialization with JSON type storage.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(JSON)]
/// metadata: UserMetadata,
/// # "####;
/// ```
///
/// Requires the `serde` feature. The field type must implement `Serialize` and `Deserialize`.
///
/// See: <https://www.postgresql.org/docs/current/datatype-json.html>
pub const JSON: ColumnMarker = ColumnMarker;

/// Enables JSON serialization with JSONB storage.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(JSONB)]
/// config: AppConfig,
/// # "####;
/// ```
///
/// JSONB is the recommended JSON storage format for most use cases.
/// It supports indexing and efficient querying.
///
/// Requires the `serde` feature. The field type must implement `Serialize` and `Deserialize`.
///
/// See: <https://www.postgresql.org/docs/current/datatype-json.html>
pub const JSONB: ColumnMarker = ColumnMarker;

/// Marks this column as storing an enum type.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(ENUM)]
/// role: Role,
/// # "####;
/// ```
///
/// For `PostgreSQL` native ENUM types or text-based enum storage.
///
/// See: <https://www.postgresql.org/docs/current/datatype-enum.html>
pub const ENUM: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Collation Markers
//------------------------------------------------------------------------------

/// Specifies a collation for a text column.
///
/// PostgreSQL collation identifiers are quoted names; the DDL emitter
/// wraps whatever you supply here in double quotes, so write the bare
/// name (`"en_US"`, `"C"`, `"POSIX"`, or any `CREATE COLLATION` value).
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(COLLATE = "en_US")]
/// name: String,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/collation.html>
pub const COLLATE: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Default Value Parameters
//------------------------------------------------------------------------------

/// Specifies a function to generate default values at runtime.
///
/// The function is called for each insert when no value is provided.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(DEFAULT_FN = Uuid::new_v4)]
/// id: Uuid,
/// # "####;
/// ```
///
/// ## Difference from DEFAULT
/// - `DEFAULT_FN`: Calls the function at runtime for each insert (e.g., UUID generation)
/// - `DEFAULT`: Uses a fixed compile-time value
pub const DEFAULT_FN: ColumnMarker = ColumnMarker;

/// Specifies a fixed default value for new rows.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(DEFAULT = 0)]
/// count: i32,
///
/// #[column(DEFAULT = "guest")]
/// role: String,
/// # "####;
/// ```
///
/// For runtime-generated values (UUIDs, timestamps), use [`DEFAULT_FN`] instead.
///
/// See: <https://www.postgresql.org/docs/current/ddl-default.html>
pub const DEFAULT: ColumnMarker = ColumnMarker;

/// Establishes a foreign key reference to another table's column.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id)]
/// user_id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const REFERENCES: ColumnMarker = ColumnMarker;

/// Specifies the ON DELETE action for foreign key references.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_DELETE = CASCADE)]
/// user_id: i32,
/// # "####;
/// ```
///
/// ## Supported Actions
/// - `CASCADE`: Delete rows that reference the deleted row
/// - `SET_NULL`: Set the column to NULL when referenced row is deleted
/// - `SET_DEFAULT`: Set the column to its default value
/// - `RESTRICT`: Prevent deletion if referenced
/// - `NO_ACTION`: Similar to RESTRICT (default)
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const ON_DELETE: ColumnMarker = ColumnMarker;

/// Specifies the ON UPDATE action for foreign key references.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_UPDATE = CASCADE)]
/// user_id: i32,
/// # "####;
/// ```
///
/// ## Supported Actions
/// - `CASCADE`: Update referencing rows when referenced row is updated
/// - `SET_NULL`: Set the column to NULL when referenced row is updated
/// - `SET_DEFAULT`: Set the column to its default value
/// - `RESTRICT`: Prevent update if referenced
/// - `NO_ACTION`: Similar to RESTRICT (default)
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const ON_UPDATE: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Referential Action Values
//------------------------------------------------------------------------------

/// Type alias for referential action markers (uses `ColumnMarker` for macro compatibility).
pub type ReferentialAction = ColumnMarker;

/// CASCADE action: Propagate the delete/update to referencing rows.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_DELETE = CASCADE)]
/// user_id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const CASCADE: ColumnMarker = ColumnMarker;

/// SET NULL action: Set referencing columns to NULL.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_DELETE = SET_NULL)]
/// user_id: Option<i32>,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const SET_NULL: ColumnMarker = ColumnMarker;

/// SET DEFAULT action: Set referencing columns to their default values.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_DELETE = SET_DEFAULT, DEFAULT = 0)]
/// user_id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const SET_DEFAULT: ColumnMarker = ColumnMarker;

/// RESTRICT action: Prevent delete/update if referenced.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_DELETE = RESTRICT)]
/// user_id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const RESTRICT: ColumnMarker = ColumnMarker;

/// NO ACTION action: Similar to RESTRICT (default behavior).
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(REFERENCES = User::id, ON_DELETE = NO_ACTION)]
/// user_id: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK>
pub const NO_ACTION: ColumnMarker = ColumnMarker;

/// Adds a CHECK constraint to this column.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[column(CHECK = "age >= 0")]
/// age: i32,
/// # "####;
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS>
pub const CHECK: ColumnMarker = ColumnMarker;

//------------------------------------------------------------------------------
// Name Marker (shared by column and table attributes)
//------------------------------------------------------------------------------

/// Marker struct for the NAME attribute.
#[derive(Debug, Clone, Copy)]
pub struct NameMarker;

/// Specifies a custom name in the database.
///
/// By default, table, view, and column names are automatically converted to `snake_case`
/// from the Rust struct/field name. Use NAME to override this behavior.
///
/// ## Column Example
/// ```rust
/// # let _ = r####"
/// // Field `createdAt` becomes `created_at` by default
/// created_at: DateTime<Utc>,
///
/// // Override with custom name:
/// #[column(NAME = "creation_timestamp")]
/// created_at: DateTime<Utc>,
/// # "####;
/// ```
///
/// ## Table Example
/// ```rust
/// # let _ = r####"
/// // Struct `UserAccount` becomes table `user_account` by default
/// struct UserAccount { ... }
///
/// // Override with custom name:
/// #[PostgresTable(NAME = "user_accounts")]
/// struct UserAccount { ... }
/// # "####;
/// ```
///
/// ## View Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(NAME = "active_users")]
/// struct ActiveUsers { ... }
/// # "####;
/// ```
pub const NAME: NameMarker = NameMarker;

//------------------------------------------------------------------------------
// View Attribute Markers
//------------------------------------------------------------------------------

/// Marker struct for view attributes.
#[derive(Debug, Clone, Copy)]
pub struct ViewMarker;

/// Specifies a view definition SQL string or expression.
///
/// ## Examples
/// ```rust
/// # let _ = r####"
/// #[PostgresView(DEFINITION = "SELECT id, name FROM users")]
/// struct UserNames { id: i32, name: String }
/// # "####;
/// ```
///
/// ```rust
/// # let _ = r####"
/// #[PostgresView(
///     DEFINITION = {
///         let builder = drizzle::postgres::QueryBuilder::new::<Schema>();
///         let Schema { user } = Schema::new();
///         builder.select((user.id, user.name)).from(user)
///     }
/// )]
/// struct UserNames { id: i32, name: String }
/// # "####;
/// ```
pub const DEFINITION: ViewMarker = ViewMarker;

/// Specifies a view schema name.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(SCHEMA = "auth")]
/// struct AuthUsers { ... }
/// # "####;
/// ```
pub const SCHEMA: ViewMarker = ViewMarker;

/// Marks the view as materialized.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(MATERIALIZED)]
/// struct ActiveUsers { ... }
/// # "####;
/// ```
pub const MATERIALIZED: ViewMarker = ViewMarker;

/// Sets WITH options for a view definition.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(WITH = ViewWithOptionDef::new().security_barrier())]
/// struct ActiveUsers { ... }
/// # "####;
/// ```
pub const WITH: ViewMarker = ViewMarker;

/// Alias for [`WITH`].
pub const WITH_OPTIONS: ViewMarker = ViewMarker;

/// Create a materialized view WITH NO DATA.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(MATERIALIZED, WITH_NO_DATA)]
/// struct ActiveUsers { ... }
/// # "####;
/// ```
pub const WITH_NO_DATA: ViewMarker = ViewMarker;

/// Specifies a USING clause for materialized views.
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(USING = "heap")]
/// struct ActiveUsers { ... }
/// # "####;
/// ```
pub const USING: ViewMarker = ViewMarker;

/// Marks the view as existing (skip creation).
///
/// ## Example
/// ```rust
/// # let _ = r####"
/// #[PostgresView(EXISTING)]
/// struct ExistingView { ... }
/// # "####;
/// ```
pub const EXISTING: ViewMarker = ViewMarker;

//------------------------------------------------------------------------------
// Table Attribute Markers
//------------------------------------------------------------------------------

/// Marker struct for table-level attributes.
#[derive(Debug, Clone, Copy)]
pub struct TableMarker;

/// Creates an UNLOGGED table.
///
/// ## Example
/// ```rust
/// # mod drizzle {
/// #     pub mod core { pub use drizzle_core::*; }
/// #     pub mod error { pub use drizzle_core::error::*; }
/// #     pub mod types { pub use drizzle_types::*; }
/// #     pub mod migrations { pub use drizzle_migrations::*; }
/// #     pub use drizzle_types::Dialect;
/// #     pub use drizzle_types as ddl;
/// #     pub mod postgres {
/// #         pub mod values { pub use drizzle_postgres::values::*; }
/// #         pub mod traits { pub use drizzle_postgres::traits::*; }
/// #         pub mod common { pub use drizzle_postgres::common::*; }
/// #         pub mod attrs { pub use drizzle_postgres::attrs::*; }
/// #         pub mod builder { pub use drizzle_postgres::builder::*; }
/// #         pub mod helpers { pub use drizzle_postgres::helpers::*; }
/// #         pub mod expr { pub use drizzle_postgres::expr::*; }
/// #         pub mod types { pub use drizzle_postgres::types::*; }
/// #         pub struct Row;
/// #         impl Row {
/// #             pub fn get<'a, I, T>(&'a self, _: I) -> T { unimplemented!() }
/// #             pub fn try_get<'a, I, T>(&'a self, _: I) -> Result<T, Box<dyn std::error::Error + Sync + Send>> { unimplemented!() }
/// #         }
/// #         pub mod prelude {
/// #             pub use drizzle_macros::{PostgresTable, PostgresSchema, PostgresIndex};
/// #             pub use drizzle_postgres::attrs::*;
/// #             pub use drizzle_postgres::common::PostgresSchemaType;
/// #             pub use drizzle_postgres::traits::{PostgresColumn, PostgresTable};
/// #             pub use drizzle_postgres::values::{PostgresInsertValue, PostgresUpdateValue, PostgresValue};
/// #             pub use drizzle_core::*;
/// #         }
/// #     }
/// # }
/// use drizzle::postgres::prelude::*;
///
/// #[PostgresTable(UNLOGGED)]
/// struct SessionCache {
///     #[column(PRIMARY)]
///     key: String,
///     data: String,
/// }
/// ```
///
/// Unlogged tables are faster but data is not crash-safe.
///
/// See: <https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-UNLOGGED>
pub const UNLOGGED: TableMarker = TableMarker;

/// Creates a TEMPORARY table.
///
/// ## Example
/// ```rust
/// # mod drizzle {
/// #     pub mod core { pub use drizzle_core::*; }
/// #     pub mod error { pub use drizzle_core::error::*; }
/// #     pub mod types { pub use drizzle_types::*; }
/// #     pub mod migrations { pub use drizzle_migrations::*; }
/// #     pub use drizzle_types::Dialect;
/// #     pub use drizzle_types as ddl;
/// #     pub mod postgres {
/// #         pub mod values { pub use drizzle_postgres::values::*; }
/// #         pub mod traits { pub use drizzle_postgres::traits::*; }
/// #         pub mod common { pub use drizzle_postgres::common::*; }
/// #         pub mod attrs { pub use drizzle_postgres::attrs::*; }
/// #         pub mod builder { pub use drizzle_postgres::builder::*; }
/// #         pub mod helpers { pub use drizzle_postgres::helpers::*; }
/// #         pub mod expr { pub use drizzle_postgres::expr::*; }
/// #         pub mod types { pub use drizzle_postgres::types::*; }
/// #         pub struct Row;
/// #         impl Row {
/// #             pub fn get<'a, I, T>(&'a self, _: I) -> T { unimplemented!() }
/// #             pub fn try_get<'a, I, T>(&'a self, _: I) -> Result<T, Box<dyn std::error::Error + Sync + Send>> { unimplemented!() }
/// #         }
/// #         pub mod prelude {
/// #             pub use drizzle_macros::{PostgresTable, PostgresSchema, PostgresIndex};
/// #             pub use drizzle_postgres::attrs::*;
/// #             pub use drizzle_postgres::common::PostgresSchemaType;
/// #             pub use drizzle_postgres::traits::{PostgresColumn, PostgresTable};
/// #             pub use drizzle_postgres::values::{PostgresInsertValue, PostgresUpdateValue, PostgresValue};
/// #             pub use drizzle_core::*;
/// #         }
/// #     }
/// # }
/// use drizzle::postgres::prelude::*;
///
/// #[PostgresTable(TEMPORARY)]
/// struct TempData {
///     id: i32,
///     value: String,
/// }
/// ```
///
/// Temporary tables exist only for the current session.
///
/// See: <https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-TEMPORARY>
pub const TEMPORARY: TableMarker = TableMarker;

/// Specifies inheritance from a parent table.
///
/// ## Example
/// ```rust
/// # mod drizzle {
/// #     pub mod core { pub use drizzle_core::*; }
/// #     pub mod error { pub use drizzle_core::error::*; }
/// #     pub mod types { pub use drizzle_types::*; }
/// #     pub mod migrations { pub use drizzle_migrations::*; }
/// #     pub use drizzle_types::Dialect;
/// #     pub use drizzle_types as ddl;
/// #     pub mod postgres {
/// #         pub mod values { pub use drizzle_postgres::values::*; }
/// #         pub mod traits { pub use drizzle_postgres::traits::*; }
/// #         pub mod common { pub use drizzle_postgres::common::*; }
/// #         pub mod attrs { pub use drizzle_postgres::attrs::*; }
/// #         pub mod builder { pub use drizzle_postgres::builder::*; }
/// #         pub mod helpers { pub use drizzle_postgres::helpers::*; }
/// #         pub mod expr { pub use drizzle_postgres::expr::*; }
/// #         pub mod types { pub use drizzle_postgres::types::*; }
/// #         pub struct Row;
/// #         impl Row {
/// #             pub fn get<'a, I, T>(&'a self, _: I) -> T { unimplemented!() }
/// #             pub fn try_get<'a, I, T>(&'a self, _: I) -> Result<T, Box<dyn std::error::Error + Sync + Send>> { unimplemented!() }
/// #         }
/// #         pub mod prelude {
/// #             pub use drizzle_macros::{PostgresTable, PostgresSchema, PostgresIndex};
/// #             pub use drizzle_postgres::attrs::*;
/// #             pub use drizzle_postgres::common::PostgresSchemaType;
/// #             pub use drizzle_postgres::traits::{PostgresColumn, PostgresTable};
/// #             pub use drizzle_postgres::values::{PostgresInsertValue, PostgresUpdateValue, PostgresValue};
/// #             pub use drizzle_core::*;
/// #         }
/// #     }
/// # }
/// use drizzle::postgres::prelude::*;
///
/// #[PostgresTable(INHERITS = "base_table")]
/// struct ChildTable {
///     extra_field: String,
/// }
/// ```
///
/// See: <https://www.postgresql.org/docs/current/ddl-inherit.html>
pub const INHERITS: TableMarker = TableMarker;

/// Specifies a tablespace for the table.
///
/// ## Example
/// ```rust
/// # mod drizzle {
/// #     pub mod core { pub use drizzle_core::*; }
/// #     pub mod error { pub use drizzle_core::error::*; }
/// #     pub mod types { pub use drizzle_types::*; }
/// #     pub mod migrations { pub use drizzle_migrations::*; }
/// #     pub use drizzle_types::Dialect;
/// #     pub use drizzle_types as ddl;
/// #     pub mod postgres {
/// #         pub mod values { pub use drizzle_postgres::values::*; }
/// #         pub mod traits { pub use drizzle_postgres::traits::*; }
/// #         pub mod common { pub use drizzle_postgres::common::*; }
/// #         pub mod attrs { pub use drizzle_postgres::attrs::*; }
/// #         pub mod builder { pub use drizzle_postgres::builder::*; }
/// #         pub mod helpers { pub use drizzle_postgres::helpers::*; }
/// #         pub mod expr { pub use drizzle_postgres::expr::*; }
/// #         pub mod types { pub use drizzle_postgres::types::*; }
/// #         pub struct Row;
/// #         impl Row {
/// #             pub fn get<'a, I, T>(&'a self, _: I) -> T { unimplemented!() }
/// #             pub fn try_get<'a, I, T>(&'a self, _: I) -> Result<T, Box<dyn std::error::Error + Sync + Send>> { unimplemented!() }
/// #         }
/// #         pub mod prelude {
/// #             pub use drizzle_macros::{PostgresTable, PostgresSchema, PostgresIndex};
/// #             pub use drizzle_postgres::attrs::*;
/// #             pub use drizzle_postgres::common::PostgresSchemaType;
/// #             pub use drizzle_postgres::traits::{PostgresColumn, PostgresTable};
/// #             pub use drizzle_postgres::values::{PostgresInsertValue, PostgresUpdateValue, PostgresValue};
/// #             pub use drizzle_core::*;
/// #         }
/// #     }
/// # }
/// use drizzle::postgres::prelude::*;
///
/// #[PostgresTable(TABLESPACE = "fast_storage")]
/// struct HighPerfTable {
///     #[column(PRIMARY)]
///     id: i32,
/// }
///
/// // Views also support TABLESPACE:
/// // #[PostgresView(MATERIALIZED, TABLESPACE = "fast_storage")]
/// // struct ActiveUsers { id: i32 }
/// ```
///
/// See: <https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-TABLESPACE>
pub const TABLESPACE: TableMarker = TableMarker;

//------------------------------------------------------------------------------
// Column Type Markers
//------------------------------------------------------------------------------

/// Marker struct for column type attributes.
#[derive(Debug, Clone, Copy)]
pub struct TypeMarker;

//--- Character Types ---

/// Specifies a TEXT column type.
///
/// TEXT stores variable-length character strings with no length limit.
///
/// See: <https://www.postgresql.org/docs/current/datatype-character.html>
pub const TEXT: TypeMarker = TypeMarker;

/// Specifies a VARCHAR column type.
///
/// VARCHAR stores variable-length character strings.
/// In `PostgreSQL`, VARCHAR without length limit is equivalent to TEXT.
///
/// See: <https://www.postgresql.org/docs/current/datatype-character.html>
pub const VARCHAR: TypeMarker = TypeMarker;

/// Alias for VARCHAR.
pub const CHARACTER_VARYING: TypeMarker = TypeMarker;

/// Specifies a CHAR column type.
///
/// CHAR stores fixed-length character strings.
///
/// See: <https://www.postgresql.org/docs/current/datatype-character.html>
pub const CHAR: TypeMarker = TypeMarker;

/// Alias for CHAR.
pub const CHARACTER: TypeMarker = TypeMarker;

//--- Integer Types ---

/// Specifies an INTEGER column type (32-bit).
///
/// INTEGER (or INT4) stores 32-bit signed integers.
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-INT>
pub const INTEGER: TypeMarker = TypeMarker;

/// Alias for INTEGER.
pub const INT: TypeMarker = TypeMarker;

/// Alias for INTEGER.
pub const INT4: TypeMarker = TypeMarker;

/// Specifies a BIGINT column type (64-bit).
///
/// BIGINT (or INT8) stores 64-bit signed integers.
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-INT>
pub const BIGINT: TypeMarker = TypeMarker;

/// Alias for BIGINT.
pub const INT8: TypeMarker = TypeMarker;

/// Specifies a SMALLINT column type (16-bit).
///
/// SMALLINT (or INT2) stores 16-bit signed integers.
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-INT>
pub const SMALLINT: TypeMarker = TypeMarker;

/// Alias for SMALLINT.
pub const INT2: TypeMarker = TypeMarker;

//--- Floating Point Types ---

/// Specifies a REAL column type (32-bit float).
///
/// REAL (or FLOAT4) stores 32-bit floating point numbers.
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-FLOAT>
pub const REAL: TypeMarker = TypeMarker;

/// Alias for REAL.
pub const FLOAT4: TypeMarker = TypeMarker;

/// Specifies a DOUBLE PRECISION column type (64-bit float).
///
/// DOUBLE PRECISION (or FLOAT8) stores 64-bit floating point numbers.
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-FLOAT>
pub const DOUBLE_PRECISION: TypeMarker = TypeMarker;

/// Alias for DOUBLE PRECISION.
pub const FLOAT8: TypeMarker = TypeMarker;

/// Alias for DOUBLE PRECISION.
pub const DOUBLE: TypeMarker = TypeMarker;

/// Specifies a NUMERIC column type (arbitrary precision).
///
/// NUMERIC stores exact numbers with arbitrary precision.
///
/// See: <https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL>
pub const NUMERIC: TypeMarker = TypeMarker;

/// Alias for NUMERIC.
pub const DECIMAL: TypeMarker = TypeMarker;

//--- Boolean Type ---

/// Specifies a BOOLEAN column type.
///
/// BOOLEAN stores true/false values.
///
/// See: <https://www.postgresql.org/docs/current/datatype-boolean.html>
pub const BOOLEAN: TypeMarker = TypeMarker;

/// Alias for BOOLEAN.
pub const BOOL: TypeMarker = TypeMarker;

//--- Binary Type ---

/// Specifies a BYTEA column type (binary data).
///
/// BYTEA stores variable-length binary strings.
///
/// See: <https://www.postgresql.org/docs/current/datatype-binary.html>
pub const BYTEA: TypeMarker = TypeMarker;

//--- UUID Type ---

/// Specifies a UUID column type.
///
/// UUID stores universally unique identifiers.
/// Requires the `uuid` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-uuid.html>
pub const UUID: TypeMarker = TypeMarker;

//--- Date/Time Types ---

/// Specifies a TIMESTAMP column type (without timezone).
///
/// TIMESTAMP stores date and time without timezone.
///
/// See: <https://www.postgresql.org/docs/current/datatype-datetime.html>
pub const TIMESTAMP: TypeMarker = TypeMarker;

/// Alias for TIMESTAMP.
pub const TIMESTAMP_WITHOUT_TIME_ZONE: TypeMarker = TypeMarker;

/// Specifies a TIMESTAMPTZ column type (with timezone).
///
/// TIMESTAMPTZ stores date and time with timezone.
///
/// See: <https://www.postgresql.org/docs/current/datatype-datetime.html>
pub const TIMESTAMPTZ: TypeMarker = TypeMarker;

/// Alias for TIMESTAMPTZ.
pub const TIMESTAMP_WITH_TIME_ZONE: TypeMarker = TypeMarker;

/// Specifies a DATE column type.
///
/// DATE stores calendar dates without time.
///
/// See: <https://www.postgresql.org/docs/current/datatype-datetime.html>
pub const DATE: TypeMarker = TypeMarker;

/// Specifies a TIME column type (without timezone).
///
/// TIME stores time of day without date or timezone.
///
/// See: <https://www.postgresql.org/docs/current/datatype-datetime.html>
pub const TIME: TypeMarker = TypeMarker;

/// Alias for TIME.
pub const TIME_WITHOUT_TIME_ZONE: TypeMarker = TypeMarker;

/// Specifies a TIMETZ column type (with timezone).
///
/// TIMETZ stores time of day with timezone.
///
/// See: <https://www.postgresql.org/docs/current/datatype-datetime.html>
pub const TIMETZ: TypeMarker = TypeMarker;

/// Alias for TIMETZ.
pub const TIME_WITH_TIME_ZONE: TypeMarker = TypeMarker;

/// Specifies an INTERVAL column type.
///
/// INTERVAL stores time intervals.
/// Requires the `chrono` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-datetime.html>
pub const INTERVAL: TypeMarker = TypeMarker;

//--- Network Address Types ---

/// Specifies an INET column type.
///
/// INET stores IPv4 or IPv6 host addresses.
/// Requires the `cidr` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-net-types.html>
pub const INET: TypeMarker = TypeMarker;

/// Specifies a CIDR column type.
///
/// CIDR stores IPv4 or IPv6 network addresses.
/// Requires the `cidr` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-net-types.html>
pub const CIDR: TypeMarker = TypeMarker;

/// Specifies a MACADDR column type.
///
/// MACADDR stores MAC addresses.
/// Requires the `cidr` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-net-types.html>
pub const MACADDR: TypeMarker = TypeMarker;

/// Specifies a MACADDR8 column type.
///
/// MACADDR8 stores EUI-64 MAC addresses.
/// Requires the `cidr` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-net-types.html>
pub const MACADDR8: TypeMarker = TypeMarker;

//--- Geometric Types ---

/// Specifies a POINT column type.
///
/// POINT stores geometric points.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const POINT: TypeMarker = TypeMarker;

/// Specifies a LINE column type.
///
/// LINE stores infinite geometric lines.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const LINE: TypeMarker = TypeMarker;

/// Specifies a LSEG column type.
///
/// LSEG stores geometric line segments.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const LSEG: TypeMarker = TypeMarker;

/// Specifies a BOX column type.
///
/// BOX stores geometric boxes.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const BOX: TypeMarker = TypeMarker;

/// Specifies a PATH column type.
///
/// PATH stores geometric paths.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const PATH: TypeMarker = TypeMarker;

/// Specifies a POLYGON column type.
///
/// POLYGON stores geometric polygons.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const POLYGON: TypeMarker = TypeMarker;

/// Specifies a CIRCLE column type.
///
/// CIRCLE stores geometric circles.
/// Requires the `geo-types` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-geometric.html>
pub const CIRCLE: TypeMarker = TypeMarker;

//--- Bit String Types ---

/// Specifies a BIT column type.
///
/// BIT stores fixed-length bit strings.
/// Requires the `bit-vec` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-bit.html>
pub const BIT: TypeMarker = TypeMarker;

/// Specifies a VARBIT column type.
///
/// VARBIT (BIT VARYING) stores variable-length bit strings.
/// Requires the `bit-vec` feature.
///
/// See: <https://www.postgresql.org/docs/current/datatype-bit.html>
pub const VARBIT: TypeMarker = TypeMarker;

/// Alias for VARBIT.
pub const BIT_VARYING: TypeMarker = TypeMarker;
