Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

SqlSessionRow

interfaz

Fila de sesión que intercambian SqlSessionStore y su driver, con cualquier cliente y dialecto SQL.

ts
import type { SqlSessionRow } from "@meekojs/meeko/server";

Source code src/server/runtime/session-stores.ts:217

Declaración #

ts
interface SqlSessionRow {
	id: string
	familyId: string
	csrfToken: string
	dataJson: string
	createdAt: number
	expiresAt: number
}

Example #

ts
import type { SqlSessionRow } from "@meekojs/meeko/server";

const fromDatabase = (row: { id: string; family_id: string; csrf_token: string; data_json: string; created_at: number; expires_at: number }): SqlSessionRow => ({
  id: row.id, familyId: row.family_id, csrfToken: row.csrf_token,
  dataJson: row.data_json, createdAt: row.created_at, expiresAt: row.expires_at,
});

Propiedades #

id #

propiedad

id: string

ID opaco de la sesión, clave primaria.

familyId #

propiedad

familyId: string

Familia de la sesión, con índice único. Migre las filas existentes con family_id = id.

csrfToken #

propiedad

csrfToken: string

Token CSRF.

dataJson #

propiedad

dataJson: string

Datos de la sesión serializados en JSON.

createdAt #

propiedad

createdAt: number

Creación, en milisegundos desde la época.

expiresAt #

propiedad

expiresAt: number

Caducidad, en milisegundos desde la época.

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/server/runtime/session-stores.ts