JsonFileDataAdapter
このコンテンツはまだ日本語訳がありません。
Defined in: extras/JsonFileDataAdapter.ts:37
Cache database using JSON file
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new JsonFileDataAdapter(
options?
):JsonFileDataAdapter
Defined in: extras/JsonFileDataAdapter.ts:53
Parameters
Section titled “Parameters”options?
Section titled “options?”JsonFileDataAdapterOptions
Returns
Section titled “Returns”JsonFileDataAdapter
Properties
Section titled “Properties”dbDir:
string
Defined in: extras/JsonFileDataAdapter.ts:39
dbFile
Section titled “dbFile”dbFile:
string
Defined in: extras/JsonFileDataAdapter.ts:38
dbPath
Section titled “dbPath”dbPath:
string
=":memory:"
Defined in: extras/JsonFileDataAdapter.ts:45
debounce
Section titled “debounce”debounce:
number
Defined in: extras/JsonFileDataAdapter.ts:41
files:
ImgProcFileRecord
[] =[]
Defined in: extras/JsonFileDataAdapter.ts:47
isInMemory
Section titled “isInMemory”isInMemory:
boolean
Defined in: extras/JsonFileDataAdapter.ts:40
retentionCount
Section titled “retentionCount”retentionCount:
null
|number
Defined in: extras/JsonFileDataAdapter.ts:44
retentionPeriod
Section titled “retentionPeriod”retentionPeriod:
null
|number
=10
Defined in: extras/JsonFileDataAdapter.ts:43
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: extras/JsonFileDataAdapter.ts:223
Close database
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”countdown()
Section titled “countdown()”countdown():
void
Defined in: extras/JsonFileDataAdapter.ts:184
Countdown all records
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”delete()
Section titled “delete()”delete(
criteria
):void
Defined in: extras/JsonFileDataAdapter.ts:152
Delete the record
Parameters
Section titled “Parameters”criteria
Section titled “criteria”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”deleteExpiredRecords()
Section titled “deleteExpiredRecords()”deleteExpiredRecords(
now
):null
|Set
<string
>
Defined in: extras/JsonFileDataAdapter.ts:197
Delete expired records
Parameters
Section titled “Parameters”number
= ...
Unixtime (milliseconds)
Returns
Section titled “Returns”null
| Set
<string
>
Deleted hashes or null
Implementation of
Section titled “Implementation of”ImgProcDataAdapter
.deleteExpiredRecords
fetch()
Section titled “fetch()”fetch(
criteria
):null
|ImgProcFileRecord
Defined in: extras/JsonFileDataAdapter.ts:108
Fetch single record
- To fetch a record with category
source
, specifyhash
. - To fetch a record with category
variant
orplaceholder
, specifysource
andprofile
.
Parameters
Section titled “Parameters”criteria
Section titled “criteria”Returns
Section titled “Returns”null
| ImgProcFileRecord
Implementation of
Section titled “Implementation of”initialize()
Section titled “initialize()”initialize(
options
):void
Defined in: extras/JsonFileDataAdapter.ts:66
Initialize database
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”insert()
Section titled “insert()”insert(
data
):void
Defined in: extras/JsonFileDataAdapter.ts:122
Insert the record
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”list()
Section titled “list()”list():
Set
<string
>
Defined in: extras/JsonFileDataAdapter.ts:118
List all hashes
Returns
Section titled “Returns”Set
<string
>
Implementation of
Section titled “Implementation of”renew()
Section titled “renew()”renew(
criteria
):void
Defined in: extras/JsonFileDataAdapter.ts:164
Renew the record
Parameters
Section titled “Parameters”criteria
Section titled “criteria”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”updateMetadata()
Section titled “updateMetadata()”updateMetadata(
data
):void
Defined in: extras/JsonFileDataAdapter.ts:132
Update the record for remote file
Parameters
Section titled “Parameters”number
expiresAt?
Section titled “expiresAt?”number
format
Section titled “format”string
number
string
height
Section titled “height”number
number
number
Returns
Section titled “Returns”void