File tree Expand file tree Collapse file tree
libs/effect-electric-db-collection/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,7 +148,6 @@ export const userCollection = createEffectCollection({
148148 schema : User . Schema ,
149149 getKey : ( item ) => item . id ,
150150} )
151- userCollection . createIndex ( ( row ) => row . id )
152151
153152export const organizationMemberCollection = createEffectCollection ( {
154153 id : "organization_members" ,
@@ -408,7 +407,6 @@ export const chatSyncMessageLinkCollection = createEffectCollection({
408407 schema : ChatSyncMessageLink . Schema ,
409408 getKey : ( item ) => item . id ,
410409} )
411- chatSyncMessageLinkCollection . createIndex ( ( row ) => row . createdAt )
412410
413411export const botCollection = createEffectCollection ( {
414412 id : "bots" ,
Original file line number Diff line number Diff line change 11import type { Row , ShapeStreamOptions } from "@electric-sql/client"
22import type { StandardSchemaV1 } from "@standard-schema/spec"
33import type { Collection , CollectionConfig , CollectionStatus } from "@tanstack/db"
4+ import { BTreeIndex } from "@tanstack/db"
45import type { ElectricCollectionUtils , Txid } from "@tanstack/electric-db-collection"
56import { electricCollectionOptions } from "@tanstack/electric-db-collection"
67import { createCollection as tanstackCreateCollection } from "@tanstack/react-db"
@@ -296,6 +297,8 @@ export function effectElectricCollectionOptions(
296297 : config . shapeOptions
297298
298299 const standardConfig = electricCollectionOptions ( {
300+ autoIndex : "eager" ,
301+ defaultIndexType : BTreeIndex ,
299302 ...config ,
300303 shapeOptions : modifiedShapeOptions ,
301304 onInsert : promiseOnInsert ,
You can’t perform that action at this time.
0 commit comments