Crate db_schema

source ·
Expand description

A module for working with PostgreSQL database schemas.

This module provides a PgSchema struct that allows you to generate SQL statements for various schema-related tasks, such as creating tables, views, and functions.

Example usage:

use crate::PgSchema;

let schema = PgSchema::new("my_schema");
let pool = get_pg_pool(); // Function to get a connection pool
let tables_sql = schema.get_tables(&pool).await.unwrap();

Structs

  • A struct representing a PostgreSQL schema.