Skip to main content

Schema

Here we've provided some utility functions for situations in which you need to access metadata of your database.

tableTypes

โ–ธ tableTypes()

Retrieve an object detailing the columns in your table mapped to their corresponding type.

async

Returns: Promise<Record<string, any>>

Example:

const { tableTypes } = useEasybase();

console.log(await tableTypes());

{
movie: "text",
rating: "number"
}

fullTableSize

โ–ธ fullTableSize()

Gets the number of records in your table.

async

Returns: Promise<number>

Example:

const { fullTableSize } = useEasybase();

console.log(await fullTableSize());