Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/aspen-cloud/triplit
/ functions
Functions
1,840 in github.com/aspen-cloud/triplit
⨍
Functions
1,840
◇
Types & classes
348
↓ 709 callers
Method
insert
(collection: keyof T, data: T[C])
packages/db/test/ivm.prototype.spec.ts:169
↓ 507 callers
Method
Schema
* A schema is a collection of fields that define the structure of an entity. * * @param properties - the fields of the schema
packages/db/src/schema/builder.ts:156
↓ 479 callers
Method
Id
(value: string)
packages/db/src/query/query-builder.ts:91
↓ 477 callers
Method
query
(collectionName: CN)
packages/db/src/db.ts:775
↓ 352 callers
Function
pause
(ms: number = 100)
packages/integration-tests/utils/async.ts:5
↓ 322 callers
Method
fetch
(query: Query)
packages/db/test/ivm.prototype.spec.ts:64
↓ 249 callers
Method
insert
( collectionName: CN, data: WriteModel<M, CN>, options?: EntityWriteOptions )
packages/db/src/db.ts:453
↓ 240 callers
Method
get
(key: Tuple, scope?: Tuple)
packages/db/src/types.ts:114
↓ 215 callers
Method
delete
(key: Tuple, scope?: Tuple)
packages/db/src/types.ts:116
↓ 215 callers
Method
set
(key: Tuple, value: any, scope?: Tuple)
packages/db/src/types.ts:115
↓ 186 callers
Method
Where
(...args: FilterInput<M, CN>)
packages/db/src/query/query-builder.ts:79
↓ 173 callers
Method
log
* Handles a single LogRecord. For example, writing to console, file, or * sending to a remote logging service.
packages/logger/src/index.ts:41
↓ 170 callers
Method
Set
(data: Record<string, any>, path: string | string[], value: any)
packages/db/src/utils/value-pointer.ts:16
↓ 156 callers
Method
Optional
* Specifies that a field is optional in the schema. When a field is optional, it can be omitted from an entity when inserting it into the database. Wh
packages/db/src/schema/builder.ts:171
↓ 150 callers
Method
update
(collection: keyof T, id: string, data: Partial<T[C]>)
packages/db/test/ivm.prototype.spec.ts:176
↓ 142 callers
Method
subscribe
( query: Q, onResults: SubscriptionResultsCallback<M, Q>, onError?: (error: Error) => void, //
packages/db/src/db.ts:160
↓ 136 callers
Method
values
()
packages/db/src/utils/nested-map.ts:37
↓ 135 callers
Method
transact
()
packages/db/src/types.ts:100
↓ 123 callers
Method
error
(message: string, attributes?: Record<string, any>)
packages/logger/src/index.ts:207
↓ 122 callers
Function
createTestClient
( server: TriplitServer, options: ClientOptions<M> = {} )
packages/integration-tests/utils/client.ts:18
↓ 120 callers
Function
genData
(attrs: any[])
packages/db/test/filters/utils.ts:22
↓ 120 callers
Function
shuffleArray
(array: any[])
packages/db/test/filters/utils.ts:149
↓ 111 callers
Method
Collections
(collections: M)
packages/db/src/schema/builder.ts:181
↓ 110 callers
Function
testFilterOp
( arg0: string | [attr: string, op: string], schema: Pick<DBSchema<M>, 'collections'>, data: any[], te
packages/db/test/filters/utils.ts:106
↓ 107 callers
Method
has
(k1: K1, k2?: K2)
packages/db/src/utils/nested-map.ts:26
↓ 103 callers
Method
fetchById
( collectionName: CN, id: string, options?: FetchOptions )
packages/db/src/db.ts:444
↓ 102 callers
Method
entries
()
packages/db/src/utils/nested-map.ts:41
↓ 100 callers
Function
prepareQuery
( query: CollectionQuery, schema: Models | undefined, variables: Record<string, any>, session: Session
packages/db/src/query/prepare-query.ts:105
↓ 98 callers
Function
cn
(...inputs: ClassValue[])
packages/ui/src/lib/utils.ts:4
↓ 95 callers
Method
insert
( collectionName: CN, object: WriteModel<M, CN> )
packages/client/src/http-client/http-client.ts:131
↓ 86 callers
Method
Order
(...args: OrderInput<M, CN>)
packages/db/src/query/query-builder.ts:119
↓ 86 callers
Method
fetch
( query: Q, options?: FetchOptions )
packages/db/src/db.ts:382
↓ 82 callers
Method
keys
()
packages/db/src/utils/nested-map.ts:33
↓ 80 callers
Function
tempTriplitServer
( options: { serverOptions?: Partial<ServerOptions>; port?: number; } = {} )
packages/integration-tests/utils/server.ts:30
↓ 76 callers
Function
validateSchema
(schema: DBSchema)
packages/db/src/schema/validation.ts:29
↓ 73 callers
Function
hasNoValue
(value: any)
packages/db/src/utils/value.ts:3
↓ 73 callers
Method
update
( collectionName: CN, id: string, data: UpdatePayload<M, CN>, options?: EntityWriteOptions )
packages/db/src/db.ts:473
↓ 69 callers
Method
updateQueryViews
()
packages/db/src/db.ts:511
↓ 67 callers
Method
next
()
packages/db/src/hybrid-clock.ts:27
↓ 62 callers
Method
broadcastToQuerySubscribers
()
packages/db/src/db.ts:515
↓ 59 callers
Method
clear
(scope?: Tuple)
packages/db/src/types.ts:119
↓ 58 callers
Method
withSessionVars
* WARNING: (I think) using `this` in the constructor will not pick up the proxy information created here * Example: new IVM(this) // db.session wil
packages/db/src/db.ts:761
↓ 56 callers
Method
toString
()
packages/db/src/errors.ts:42
↓ 55 callers
Method
Include
(alias: any, queryExt?: any)
packages/db/src/query/query-builder.ts:201
↓ 51 callers
Function
encodeTuple
(tuple: Tuple, options?: EncodingOptions)
packages/db/src/codec.ts:148
↓ 50 callers
Method
Limit
(value: number)
packages/db/src/query/query-builder.ts:107
↓ 49 callers
Method
connect
* Connect to the server with the given parameters. If this transport is already connected, it should close the existing connection and open a new one.
packages/client/src/transport/types/index.ts:28
↓ 48 callers
Function
testLte
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:79
↓ 47 callers
Method
subscribe
(query: Query, callback: (results: any) => void)
packages/db/test/ivm.prototype.spec.ts:308
↓ 47 callers
Function
testEq
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:34
↓ 47 callers
Function
testGte
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:61
↓ 46 callers
Function
testGt
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:52
↓ 46 callers
Function
testLt
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:70
↓ 46 callers
Method
write
(tx: KVStoreTransaction, buffer: DBChanges)
packages/db/src/types.ts:77
↓ 44 callers
Function
testNEq
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:43
↓ 43 callers
Method
getChanges
(storage: KVStoreOrTransaction)
packages/db/src/types.ts:78
↓ 39 callers
Function
cn
(...inputs: ClassValue[])
templates/chat-template/lib/utils.ts:4
↓ 39 callers
Method
disconnect
* Disconnect from the server
packages/client/src/sync-engine.ts:1115
↓ 38 callers
Method
commit
()
packages/db/src/types.ts:135
↓ 37 callers
Method
Select
( value: ReadonlyArray<Selection> | undefined )
packages/db/src/query/query-builder.ts:65
↓ 37 callers
Function
testNIn
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:97
↓ 36 callers
Function
encodeToken
(payload: any, exp?: string)
packages/integration-tests/tests/sessions.spec.ts:20
↓ 36 callers
Method
fetchOne
( query: Q, options?: FetchOptions )
packages/db/src/db.ts:433
↓ 36 callers
Function
hashPreparedQuery
(query: PreparedQuery)
packages/db/src/query/hash-query.ts:53
↓ 36 callers
Method
query
(collectionName: CN)
packages/client/src/http-client/http-client.ts:247
↓ 34 callers
Method
scope
(prefix: Tuple)
packages/db/src/types.ts:99
↓ 33 callers
Method
scan
(options: ScanOptions, scope?: Tuple)
packages/db/src/types.ts:117
↓ 32 callers
Function
simplifyQuery
(query: PreparedQuery)
packages/db/src/query/simplify-query.ts:16
↓ 32 callers
Method
warn
(message: string, attributes?: Record<string, any>)
packages/logger/src/index.ts:203
↓ 30 callers
Function
testIn
( schema: Pick<DBSchema<M>, 'collections'>, data: any[], test: FilterTestDefinition, options: TestOpti
packages/db/test/filters/utils.ts:88
↓ 29 callers
Function
String
(opts: BuiltInFlagOpts)
packages/cli/src/flags.ts:25
↓ 29 callers
Function
fakeTx
(db: DB<M>)
packages/db/test/typecheck/utils.ts:3
↓ 29 callers
Method
flushChanges
()
packages/db/test/ivm.prototype.spec.ts:196
↓ 29 callers
Method
flushChangesToListeners
()
packages/db/test/ivm.prototype.spec.ts:339
↓ 27 callers
Function
fnv1aHash
(str: string, seed = 2166136261 >>> 0)
packages/db/src/utils/hash.ts:4
↓ 26 callers
Function
combineHashes
(h1: number, h2: number)
packages/db/src/utils/hash.ts:17
↓ 26 callers
Function
diffSchemas
( schemaA: DBSchema<Models>, schemaB: DBSchema<Models> )
packages/db/src/schema/diff-issues.ts:145
↓ 26 callers
Function
require
(args: any)
packages/server/src/utils/esm.ts:4
↓ 26 callers
Function
spyMessages
( client: TriplitClient<M> )
packages/integration-tests/utils/client.ts:35
↓ 25 callers
Method
close
* Closes the connection to the server. If the transport is not connected, this should be a no op.
packages/client/src/transport/types/index.ts:32
↓ 24 callers
Function
Command
( def: CommandDefinition<Args, Flags, Middleware> )
packages/cli/src/command.ts:58
↓ 24 callers
Function
ServerResponse
(statusCode: number = 200, payload?: any)
packages/server-core/src/session.ts:32
↓ 23 callers
Method
getLockedBuffer
()
packages/db/src/types.ts:94
↓ 22 callers
Method
Get
(data: Record<string, any>, path: string | Iterable<string>)
packages/db/src/utils/value-pointer.ts:5
↓ 22 callers
Function
isFilterStatement
( filter: WhereFilter | PreparedWhereFilter )
packages/db/src/filters.ts:281
↓ 22 callers
Method
toJSON
()
packages/db/src/errors.ts:46
↓ 21 callers
Function
fetch
* This will mostly just pass request to Triplit Durable Object * but also can be where you serve static assets or do any basic * rendering at th
packages/cli/src/deploy/worker.ts:45
↓ 19 callers
Method
getChangesForEntity
( storage: KVStoreOrTransaction, collectionName: CollectionName, id: EntityId )
packages/db/src/types.ts:83
↓ 19 callers
Function
or
(where: W)
packages/db/src/filters.ts:427
↓ 18 callers
Method
count
(countOptions: CountOptions, scope?: Tuple)
packages/db/src/types.ts:120
↓ 18 callers
Method
debug
(message: string, attributes?: Record<string, any>)
packages/logger/src/index.ts:190
↓ 18 callers
Function
exists
(relationship: any, ext: any = {})
packages/db/src/filters.ts:470
↓ 18 callers
Function
hasAdminAccess
(token: ProjectJWT)
packages/server-core/src/session.ts:49
↓ 18 callers
Function
isFilterGroup
(filter: any)
packages/db/src/filters.ts:306
↓ 18 callers
Function
isSubQueryFilter
(filter: any)
packages/db/src/filters.ts:314
↓ 18 callers
Function
red
(text: string)
packages/cli/src/log-handlers/dev-server-logs.ts:19
↓ 17 callers
Function
isValueVariable
(value: QueryValue)
packages/db/src/variables.ts:43
↓ 17 callers
Method
onConnectionStatusChange
* Sets up a listener for connection status changes * @param callback A callback that will be called when the connection status changes * @param
packages/client/src/sync-engine.ts:1243
↓ 17 callers
Function
testSubscription
( db: DB, query: Q, steps: Steps<Q> )
packages/db/test/utils/test-subscription.ts:20
↓ 16 callers
Method
getEntity
( storage: KVStoreOrTransaction, collection: string, id: string // TODO: make this null )
packages/db/src/types.ts:54
next →
1–100 of 1,840, ranked by callers