Synclets logoSynclets

createDataConnector

Essential

The createDataConnector function creates a custom DataConnector instance from the provided implementation callbacks.

createDataConnector<Depth>(
  options: DataConnectorOptions<Depth>,
  implementations: DataConnectorImplementations<Depth>,
  optimizations?: DataConnectorOptimizations<Depth>,
  extraMembers?: ExtraMembers,
): DataConnector<Depth>
TypeDescription
optionsDataConnectorOptions<Depth>
implementationsDataConnectorImplementations<Depth>
optimizations?DataConnectorOptimizations<Depth>
extraMembers?ExtraMembers
returnsDataConnector<Depth>

This low-level factory allows you to build connectors for any storage backend by implementing the required read/write callbacks (readAtom, writeAtom, removeAtom, readChildIds). Optional optimization callbacks (readAtoms, getData) can improve bulk operation performance.

Most applications should use pre-built connector factories like createPgliteDataConnector or createFileDataConnector rather than calling this function directly.

Since

v0.0.0