Skip to content

Start

npm i @hedystia/db
pnpm install @hedystia/db
bun add @hedystia/db
yarn add @hedystia/db
  • v18.0.0 or higher
FunctionDescription
dropAllTo drop all data from a table
readTablesTo read the tables from the database
enableMigrationsTo enable migrations
createMigrationTo create a migration
createTableTo create a table
deleteTableTo delete a table
createTableIfNotExistsTo create a table if it does not exist
deleteTableIfExistsTo delete a table if it exists
renameTableTo rename a table
addColumnTo add a column to an already created table
deleteColumnTo remove a column to an already created table
renameColumnTo rename a column
insertTo insert a data in the table
updateTo update a data in the table
selectTo search for information in a table
deleteTo delete a data from the table
getTableNamesTo get the names of all tables
getColumnNamesTo get the names of all columns
getRecordCountTo get the number of records in a table