Version: 0.15.x

SQLiteKnexDBDataProvider

Knex.js database data provider exposing basic CRUD operations.

NOTE: This class implements SQLite specific implementaion

Type parameters

Type

Hierarchy

Implements

  • GraphbackDataProvider‹Type›

Index

Constructors

Properties

Methods

Constructors

constructor

+ new SQLiteKnexDBDataProvider(baseType: GraphQLObjectType, db: Knex): SQLiteKnexDBDataProvider

Overrides KnexDBDataProvider.constructor

Defined in SQLiteKnexDBDataProvider.ts:12

Parameters:

NameType
baseTypeGraphQLObjectType
dbKnex

Returns: SQLiteKnexDBDataProvider

Properties

Protected baseType

baseType: GraphQLObjectType

Inherited from KnexDBDataProvider.baseType

Defined in KnexDBDataProvider.ts:20


Protected db

db: Knex

Inherited from KnexDBDataProvider.db

Defined in KnexDBDataProvider.ts:19


Protected tableMap

tableMap: ModelTableMap

Inherited from KnexDBDataProvider.tableMap

Defined in KnexDBDataProvider.ts:22


Protected tableName

tableName: string

Inherited from KnexDBDataProvider.tableName

Defined in KnexDBDataProvider.ts:21

Methods

batchRead

batchRead(relationField: string, ids: string[], filter: any, context: GraphbackContext): Promise‹Type[][]›

Inherited from KnexDBDataProvider.batchRead

Defined in KnexDBDataProvider.ts:104

Parameters:

NameType
relationFieldstring
idsstring[]
filterany
contextGraphbackContext

Returns: Promise‹Type[][]›


count

count(filter: any): Promise‹number›

Inherited from KnexDBDataProvider.count

Defined in KnexDBDataProvider.ts:97

Parameters:

NameType
filterany

Returns: Promise‹number›


create

create(data: Type, context: GraphbackContext): Promise‹Type›

Overrides KnexDBDataProvider.create

Defined in SQLiteKnexDBDataProvider.ts:18

Parameters:

NameType
dataType
contextGraphbackContext

Returns: Promise‹Type›


delete

delete(data: Type, context: GraphbackContext): Promise‹Type›

Inherited from KnexDBDataProvider.delete

Defined in KnexDBDataProvider.ts:57

Parameters:

NameType
dataType
contextGraphbackContext

Returns: Promise‹Type›


findBy

findBy(filter: QueryFilter‹Type›, context: GraphbackContext, page?: GraphbackPage, orderBy?: GraphbackOrderBy): Promise‹Type[]›

Inherited from KnexDBDataProvider.findBy

Defined in KnexDBDataProvider.ts:81

Parameters:

NameType
filterQueryFilter‹Type›
contextGraphbackContext
page?GraphbackPage
orderBy?GraphbackOrderBy

Returns: Promise‹Type[]›


findOne

findOne(args: Partial‹Type›, context: GraphbackContext): Promise‹Type›

Inherited from KnexDBDataProvider.findOne

Defined in KnexDBDataProvider.ts:70

Parameters:

NameType
argsPartial‹Type›
contextGraphbackContext

Returns: Promise‹Type›


Protected getSelectedFields

getSelectedFields(context: GraphbackContext): string[] | ""*

Inherited from KnexDBDataProvider.getSelectedFields

Defined in KnexDBDataProvider.ts:121

Parameters:

NameType
contextGraphbackContext

Returns: string[] | ""*


update

update(data: Type, context: GraphbackContext): Promise‹Type›

Inherited from KnexDBDataProvider.update

Defined in KnexDBDataProvider.ts:41

Parameters:

NameType
dataType
contextGraphbackContext

Returns: Promise‹Type›