Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MemorySession

Hierarchy

Index

Properties

_serverAddress?: string
_dcId: number
_port?: number
_takeoutId: undefined
_entities: Set<any>
_updateStates: {}

Type declaration

    _authKey?: AuthKey

    Constructors

    Methods

    • setDC(dcId: number, serverAddress: string, port: number): void
    • Sets the information of the data center address and port that the library should connect to, as well as the data center ID, which is currently unused.

      Parameters

      • dcId: number
      • serverAddress: string
      • port: number

      Returns void

    • getAuthKey(dcId?: number): undefined | AuthKey
    • setAuthKey(authKey?: AuthKey, dcId?: number): undefined
    • close(): void
    • save(): void
    • load(): Promise<void>
    • delete(): void
    • _entityValuesToRow(id: string | BigInteger, hash: string | BigInteger, username: string, phone: string, name: string): (string | BigInteger)[]
    • Parameters

      • id: string | BigInteger
      • hash: string | BigInteger
      • username: string
      • phone: string
      • name: string

      Returns (string | BigInteger)[]

    • _entityToRow(e: any): undefined | (string | BigInteger)[]
    • _entitiesToRows(tlo: any): (string | BigInteger)[][]
    • processEntities(tlo: any): void
    • getEntityRowsByPhone(phone: string): undefined | any[]
    • getEntityRowsByUsername(username: string): undefined | any[]
    • getEntityRowsByName(name: string): undefined | any[]
    • getEntityRowsById(id: string | BigInteger, exact?: boolean): undefined | any[]

    Accessors

    • get dcId(): number
    • get serverAddress(): string
    • get port(): number
    • get authKey(): undefined | AuthKey
    • set authKey(value: undefined | AuthKey): void
    • get takeoutId(): undefined
    • set takeoutId(value: undefined): void

    Generated using TypeDoc