monolayer-pg / schema / text
Function: text()
text():
PgText
Column that stores variable unlimited length strings.
Returns
Remarks
In any case, the longest possible character string that can be stored is about 1 GB.
Kysely database schema type definition
ts
{
readonly __select__: string | null;
readonly __insert__: string | null | undefined;
readonly __update__: string | null;
};
Nullability and optionality will change according to the column's constraints, generated values, and default data values.
Example
ts
import { schema, table, text } from "@monolayer/pg/schema";
const dbSchema = schema({
tables: {
example: table({
columns: {
description: text(),
},
}),
},
});
// Kysely database schema type
type DB = typeof dbSchema.infer;
See
PostgreSQL Docs: text