Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SlimSQLAPI

Hierarchy

Index

Constructors

constructor

  • new SlimSQLAPI(client: AxiosInstance, tokenStore: TokenStore, urlPrefix: string, defaultRole?: any): SlimSQLAPI

Properties

client

client: AxiosInstance

defaultRole

defaultRole: any

tokenStore

tokenStore: TokenStore

urlPrefix

urlPrefix: string

Methods

bulkInsert

  • 批量新建

    Parameters

    • items: any

      复数的数据记录

    • Default value __namedParameters: { returning: any; role: {} } = {}
      • returning: any
      • role: {}

    Returns Promise<SlimResponseBulkInsert>

delete

  • delete(params: any, __namedParameters?: { bulk: boolean; role: {} }): Promise<SlimResponseDelete>

get

  • get(params?: any, __namedParameters?: { role: {} }): Promise<SlimResponseGet>

list

  • list(params?: any, page?: number, __namedParameters?: { role: {}; size: any }): Promise<SlimResponseList>

new

  • new(data: any, __namedParameters?: { returning: any; role: {} }): Promise<SlimResponseNew>

request

  • request(url: any, method: any, __namedParameters?: { bulk: any; data: any; headers: any; params: any; returning: any; role: {} }): Promise<SlimResponse>
  • Parameters

    • url: any
    • method: any
    • Default value __namedParameters: { bulk: any; data: any; headers: any; params: any; returning: any; role: {} } = {}
      • bulk: any
      • data: any
      • headers: any
      • params: any
      • returning: any
      • role: {}

    Returns Promise<SlimResponse>

saveAccessToken

  • saveAccessToken(token: any): void

set

  • set(params: any, data: any, __namedParameters?: { bulk: any; returning: any; role: {} }): Promise<SlimResponseSet>
  • 更新数据,当存在 returning 时,返回影响的数据列表,否则返回影响数据的个数

    Parameters

    Returns Promise<SlimResponseSet>

Generated using TypeDoc