Foodtruck Order — TypeScript Reference - v0.1.0
    Preparing search index...

    Function createDatabase

    • Create the project's database access object: the Drizzle query builder over a postgres.js client, plus a close function.

      Parameters

      • databaseUrl: string

      Returns { close: () => Promise<void>; db: PostgresJsDatabase<__module> }

      • close: () => Promise<void>

        Close the underlying postgres.js client and free its connection.

      • db: PostgresJsDatabase<__module>

        The Drizzle query builder bound to the project schema.

        All table access (queries, inserts, updates) goes through this object so database code never talks to the raw postgres.js client.