MCPcopy Index your code

hub / github.com/Nozbe/WatermelonDB / functions

Functions970 in github.com/Nozbe/WatermelonDB

↓ 476 callersFunctionit
(name, test)
src/adapters/__tests__/commonTests.js:38
↓ 191 callersMethodwrite
* Schedules a Writer * * Writer is a block of code, inside of which you can modify the database * (call `Collection.create`, `Model.update`,
src/Database/index.js:252
↓ 131 callersFunctioninvariant
(condition: any, errorMessage?: string)
src/utils/common/invariant/index.js:7
↓ 118 callersMethodbatch
(operations: BatchOperation[], callback: ResultCallback<void>)
src/adapters/type.js:50
↓ 117 callersFunctionmockDatabase
({ schema = testSchema, migrations = undefined } = {})
src/__tests__/testModels.js:112
↓ 105 callersMethodquery
(query: SerializedQuery, callback: ResultCallback<CachedQueryResult>)
src/adapters/type.js:38
↓ 96 callersMethodget
* Returns a `Collection` for a given table name
src/Database/index.js:72
↓ 84 callersMethodcreate
* Creates a new record. * Pass a function to set attributes of the new record. * * Note: This method must be called within a Writer {@link Da
src/Collection/index.js:146
↓ 72 callersMethodfind
(table: TableName<any>, id: RecordId, callback: ResultCallback<CachedFindResult>)
src/adapters/type.js:35
↓ 62 callersFunctionexpectToRejectWithMessage
( promise: Promise<mixed>, message: string | RegExp, )
src/__tests__/utils/expectToRejectWithMessage/index.js:3
↓ 62 callersFunctionmatchTest
( options: $Exact<{ name: string, query: QueryBuilders.Clause[], matching: Array<{ id: string, .
src/__tests__/databaseTests.js:10
↓ 62 callersFunctionmockTaskRaw
(raw)
src/adapters/__tests__/helpers.js:148
↓ 61 callersMethodupdate
* Modifies the record. * Pass a function to set attributes of the new record. * * Updates `updateAt` field (if available) * * Note: Thi
src/Model/index.js:110
↓ 60 callersFunctionmakeDatabase
()
src/sync/impl/__tests__/helpers.js:6
↓ 59 callersFunctiontaskQuery
(...conditions)
src/adapters/__tests__/helpers.js:145
↓ 51 callersFunctionlog
(text: string = '')
src/diagnostics/diagnoseSyncConsistency/impl.js:269
↓ 50 callersFunctionsynchronize
(args: SyncArgs)
src/sync/index.js:123
↓ 48 callersMethodlog
(...messages: any[])
src/utils/common/logger/index.js:16
↓ 48 callersFunctiontableSchema
({ name, columns: columnArray, unsafeSql, }: TableSchemaSpec)
src/Schema/index.js:138
↓ 47 callersFunctionlog
(text: string = '')
src/diagnostics/diagnoseDatabaseStructure/impl.js:160
↓ 46 callersMethodcall
(methodName: SqliteDispatcherMethod, args: any[], callback: ResultCallback<any>)
src/adapters/sqlite/type.js:88
↓ 41 callersFunctionprepareCreateFromRaw
(collection, dirtyRaw)
src/sync/impl/__tests__/helpers.js:29
↓ 40 callersMethodcount
(query: SerializedQuery, callback: ResultCallback<number>)
src/adapters/type.js:47
↓ 38 callersMethodprepareCreate
* Prepares a new record to be created * * Use this to batch-execute multiple changes at once. * @see {Collection#create} * @see {Database#
src/Collection/index.js:161
↓ 36 callersFunctionsanitizedRaw
(dirtyRaw: DirtyRaw, tableSchema: TableSchema)
src/RawRecord/index.js:71
↓ 34 callersFunctionfetchLocalChanges
(db: Database)
src/sync/impl/fetchLocal.js:52
↓ 32 callersFunctionmakeLocalChanges
(database)
src/sync/impl/__tests__/helpers.js:73
↓ 30 callersFunctionschemaMigrations
(migrationSpec: SchemaMigrationsSpec)
src/Schema/migrations/index.js:85
↓ 29 callersMethodsubscribe
(props: PropsInput, triggeredFromProps: any[])
src/react/withObservables/index.js:182
↓ 29 callersFunctiontoPromise
(withCallback: (ResultCallback<T>) => void)
src/utils/fp/Result/index.js:8
↓ 28 callersFunctionaddColumns
({ table, columns, unsafeSql, }: $Exact<{ table: TableName<any>, columns: ColumnSchema[], unsafeSq
src/Schema/migrations/index.js:144
↓ 28 callersFunctionexpectSyncedAndMatches
(collection, id, match)
src/sync/impl/__tests__/helpers.js:40
↓ 28 callersFunctionmakeDatabase
()
src/Model/test.js:86
↓ 28 callersMethodserialize
()
src/Query/index.js:306
↓ 27 callersMethodread
* Schedules a Reader * * In a Reader, you're guaranteed that no Writer is running at the same time. Therefore, you can * run many queries or
src/Database/index.js:270
↓ 26 callersFunctionarrayDifference
(previousList: T[], nextList: T[])
src/utils/fp/arrayDifference/index.js:5
↓ 25 callersMethod_setRaw
(rawFieldName: ColumnName, rawValue: Value)
src/Model/index.js:437
↓ 25 callersFunctionencoded
(clauses, countMode)
src/adapters/sqlite/encodeQuery/test.js:34
↓ 22 callersMethodgetLocal
(key: string, callback: ResultCallback<?string>)
src/adapters/type.js:75
↓ 22 callersFunctionmakeChangeSet
(set)
src/sync/impl/__tests__/helpers.js:58
↓ 21 callersMethod_getRaw
(rawFieldName: ColumnName)
src/Model/index.js:432
↓ 21 callersMethodmarkAsDeleted
* Marks this record as deleted (it will be deleted permanently after sync) * * Note: This method must be called within a Writer {@link Database#
src/Model/index.js:170
↓ 21 callersMethodtestClone
(options?: $Shape<SQLiteAdapterOptions> = {})
src/adapters/sqlite/index.js:106
↓ 21 callersMethodwarn
(...messages: any[])
src/utils/common/logger/index.js:20
↓ 20 callersMethodadd
(record: Record)
src/Collection/RecordCache.js:36
↓ 20 callersFunctionemptyPull
(timestamp = 1500)
src/sync/impl/__tests__/helpers.js:132
↓ 20 callersFunctionexpectSortedEqual
(actual, expected)
src/adapters/__tests__/helpers.js:165
↓ 20 callersMethodunsafeResetDatabase
(callback: ResultCallback<void>)
src/adapters/type.js:69
↓ 19 callersMethodbatch
@see {Database#batch}
src/Database/WorkQueue.js:48
↓ 19 callersFunctionexpectError
(promise)
src/Model/test.js:460
↓ 19 callersMethodfetch
* Fetches the list of records matching this query * * Tip: For convenience, you can also use `await query`
src/Query/index.js:125
↓ 19 callersMethodsubscribe
(subscriber: (T) => void, debugInfo?: any)
src/utils/subscriptions/SharedSubscribable/index.js:30
↓ 19 callersMethodthen
( onFulfill?: (value: number) => Promise<U> | U, onReject?: (error: any) => Promise<U> | U, )
src/Query/index.d.ts:25
↓ 18 callersFunctionisObj
(maybeObject: T)
src/utils/fp/isObj/index.js:3
↓ 17 callersMethodobserve
()
src/react/withObservables/index.js:15
↓ 16 callersMethoddestroyPermanently
* Permanently deletes this record from the database * * Note: Do not use this when using Sync, as deletion will not be synced. * * Note: T
src/Model/index.js:203
↓ 16 callersMethoderror
(...messages: any[])
src/utils/common/logger/index.js:24
↓ 16 callersFunctiongetRaw
(collection, id)
src/sync/impl/__tests__/helpers.js:34
↓ 16 callersMethodprepareUpdate
* Prepares record to be updated * * Use this to batch-execute multiple changes at once. * Note: Prepared changes must be executed by **synchr
src/Model/index.js:125
↓ 16 callersFunctiontestApplyRemoteChanges
(db, set, extraContext = {})
src/sync/impl/__tests__/applyRemote.test.js:21
↓ 16 callersFunctionvalidateTable
(tableName: TableName<any>, schema: AppSchema)
src/adapters/common.js:42
↓ 15 callersFunctioncheck
(value)
src/Database/LocalStorage/test.js:48
↓ 15 callersMethodextend
(...args: Clause[])
src/Query/index.js:92
↓ 15 callersFunctionlogError
(errorMessage: string)
src/utils/common/logError/index.js:10
↓ 15 callersFunctionprepare
(collection, raw)
src/Model/test.js:917
↓ 15 callersFunctionstepsForMigration
({ migrations: schemaMigrations, fromVersion, toVersion, }: $Exact<{ migrations: SchemaMigrations, f
src/Schema/migrations/stepsForMigration.js:8
↓ 14 callersFunctioncleanFolder
(dir)
scripts/make.mjs:58
↓ 14 callersFunctionencodeValue
(value: Value)
src/adapters/sqlite/encodeValue/index.js:12
↓ 14 callersFunctionencoded
(clauses)
src/adapters/lokijs/worker/encodeQuery/test.js:30
↓ 14 callersMethodexperimentalSubscribe
* Notifies `subscriber` on every change (update/delete) of this record * * Notification contains a flag that indicates whether the change is due
src/Model/index.js:407
↓ 14 callersMethodgetDeletedRecords
(tableName: TableName<any>, callback: ResultCallback<RecordId[]>)
src/adapters/type.js:53
↓ 14 callersFunctionjoinTest
( options: $Exact<{ name: string, query: QueryBuilders.Clause[], extraRecords: { ['project
src/__tests__/databaseTests.js:982
↓ 14 callersMethodset
(record: T)
src/Relation/index.js:86
↓ 13 callersFunctionallPass
(predicates: Array<(T) => boolean>)
src/utils/fp/allPass/index.js:3
↓ 13 callersFunctioncheckName
(name: T)
src/utils/fp/checkName/index.js:28
↓ 13 callersFunctioncreateTable
(tableSchemaSpec: TableSchemaSpec)
src/Schema/migrations/index.js:139
↓ 13 callersMethodfetchCount
* Fetches the number of records matching this query * * Tip: For convenience you can also use `await query.count`
src/Query/index.js:169
↓ 13 callersMethodpipe
* `query.pipe(fn)` is a FP convenience for `fn(query)`
src/Query/index.js:116
↓ 13 callersFunctionresolvePath
(...paths)
scripts/make.mjs:33
↓ 13 callersMethodsetLocal
(key: string, value: string, callback: ResultCallback<void>)
src/adapters/type.js:78
↓ 12 callersFunctionappSchema
({ version, tables: tableList, unsafeSql }: AppSchemaSpec)
src/Schema/index.js:85
↓ 12 callersFunctionareRecordsEqual
(left: T, right: T)
src/utils/fp/areRecordsEqual/index.js:4
↓ 12 callersFunctionexpectDoesNotExist
(collection, id)
src/sync/impl/__tests__/helpers.js:47
↓ 11 callersMethodcallReader
* Calls a Reader so that it runs as part of the current Reader (or Writer) instead of deadlocking. * * Specifically, the passed block should imm
src/Database/WorkQueue.js:25
↓ 11 callersFunctioncountAll
(collections)
src/sync/impl/__tests__/helpers.js:8
↓ 11 callersMethodget
(tableName: TableName<T>)
src/Database/CollectionMap/index.js:33
↓ 11 callersFunctionpipe
(...fns: ((any) => any)[])
src/utils/fp/pipe/index.js:23
↓ 11 callersFunctiontest
(input, column, output)
src/sync/helpers.test.js:15
↓ 11 callersMethodunsafeQueryRaw
(query: SerializedQuery, callback: ResultCallback<any[]>)
src/adapters/type.js:44
↓ 11 callersFunctionwaitForNextQuery
()
src/observation/subscribeToQueryWithColumns/test.js:33
↓ 10 callersFunctionanyPass
(predicates: Array<(T) => boolean>)
src/utils/fp/anyPass/index.js:3
↓ 10 callersMethoddestroyDeletedRecords
( tableName: TableName<any>, recordIds: RecordId[], callback: ResultCallback<void>, )
src/adapters/type.js:56
↓ 10 callersFunctiongetLastPulledAt
(database: Database)
src/sync/impl/index.js:17
↓ 10 callersMethodprepareCreateFromDirtyRaw
* Prepares a new record to be created, based on a raw object. * * Don't use this unless you know how RawRecords work in WatermelonDB. See docs f
src/Collection/index.js:174
↓ 10 callersFunctionsanitize
(raw)
src/adapters/sqlite/encodeBatch/test.js:27
↓ 10 callersFunctionsort
(list)
src/Model/test.js:919
↓ 10 callersMethodunsubscribe
()
flow-typed/npm/rxjs_v6.x.js:19
↓ 9 callersFunctionallDeletedRecords
(collections)
src/sync/impl/__tests__/helpers.js:21
↓ 9 callersFunctionallPromises
(action: (T) => Promise<U>, promises: T[])
src/utils/fp/allPromises/index.js:3
↓ 9 callersMethodcallWriter
* Calls another Writer so that it runs as part of the current Writer instead of deadlocking. * * Specifically, the passed block should immediate
src/Database/WorkQueue.js:45
next →1–100 of 970, ranked by callers