Skip to content

@tyravel/database

Database ORM, query builder, and migrations for Tyravel

Install

bash
npm install @tyravel/database

Metadata

FieldValue
Version1.0.1
Sourcepackages/database
CategoryDatabase
Node.js>=26

Tyravel dependencies

Public exports

From the package entry point (dist/index.d.ts). Deep imports are not supported.

Values

  • AttributeCacheStore
  • BelongsToManyRelation
  • BelongsToRelation
  • Blueprint
  • DatabaseManager
  • Factory
  • HasManyRelation
  • HasOneRelation
  • HasUlids
  • HasUuids
  • LazyLoadingViolationError
  • LengthAwarePaginator
  • Migration
  • Migrator
  • Model
  • ModelPruneReport
  • ModelQueryBuilder
  • MorphManyRelation
  • MorphToRelation
  • MysqlGrammar
  • Pivot
  • PostgresGrammar
  • PrunableModelStatic
  • QueryBuilder
  • QueryProfiler
  • Relation
  • SchemaBuilder
  • Seeder
  • SeederRunner
  • SoftDeletingScope
  • SqliteConnection
  • SqliteGrammar
  • applyCastsToAttributes
  • buildAttributeCacheKey
  • castAttribute
  • clearModelAttributeCacheResolver
  • clearMorphMap
  • createGlobalScope
  • fakeEmail
  • fakeLocalizedDate
  • fakeName
  • fakeSequence
  • fakeSlug
  • fakeText
  • fireModelEvent
  • forgetModelAttribute
  • generateUlid
  • getContextConnection
  • getFactoryLocale
  • getModelAttributeCache
  • isCustomCast
  • isPrunableModel
  • migrationsTableSql
  • pruneModel
  • pruneModels
  • registerMorphMap
  • rememberModelAttribute
  • resetFactoryHelpers
  • resolveMorphAlias
  • resolveMorphModel
  • runWithConnection
  • scopeMethodName
  • serializeAttributesForStorage
  • serializeCast
  • setFactoryLocale
  • setModelAttributeCacheResolver
  • setPreventLazyLoading
  • shouldPreventLazyLoading
  • wrapConnectionWithProfiler

Types

  • Cast
  • CastType
  • ConnectionConfig
  • DatabaseConfig
  • DatabaseConnection
  • DatabaseDriverFactory
  • DriverName
  • GlobalScope
  • LocalScope
  • ModelCast
  • ModelCastMap
  • ModelEventHandler
  • ModelEventName
  • ModelStatic
  • PaginatedResponse
  • PaginatorMeta
  • QueryProfileEntry
  • QueryResult
  • Row
  • RowValue
  • SqlGrammar
  • SqliteConnectionConfig
  • WhereClause
  • WhereOperator

Guide

See the Database & ORM guide for usage examples.

Released under the MIT License.