Attribute Macro tp_gen

Source
#[tp_gen]
Expand description

tp_gen is a procedural macro attribute that provides advanced code generation capabilities for database operations. This macro allows for more complex and customizable generation of database-related functions beyond what the derive macros provide.

§Syntax

use sqlx_template::tp_gen;

#[tp_gen(table = "users")]
pub struct User {
    pub id: i32,
    pub name: String,
}

§Attributes

The specific attributes and configuration options for tp_gen depend on the implementation and can include various database operation configurations.

§Example Usage

use sqlx_template::tp_gen;

#[tp_gen(table = "users")]
pub struct User {
    pub id: i32,
    pub name: String,
    pub email: String,
}

§Note

This is an advanced macro for specialized use cases. For most common database operations, consider using the individual derive macros like InsertTemplate, UpdateTemplate, etc., or the comprehensive SqlxTemplate macro.