@sh1n4ps/plasma-core
@sh1n4ps/plasma-core is the isomorphic layer. Both the browser engine
(@sh1n4ps/plasma-client) and the server engine (@sh1n4ps/plasma-server) import
from it. Your schema.ts and mutators.ts typically import from
it too.
What’s here
Section titled “What’s here”- Schema DSL —
defineSchema,table,id,text,int,bigint,boolean,blob,json,file,ref,storageRef, plus column modifiers (.nullable,.unique,.default,.encrypted) - Mutators —
defineMutators,invokeMutator,MutatorFn,MutatorObject,MutatorValidationError,MutatorOrigin - Query AST + builder —
eq,ne,gt,and,or,inArray,asc,desc,count,sum,avg,min,max,like,isNull,isNotNull,SelectBuilder,InsertBuilder,UpdateBuilder,DeleteBuilder,Db,createDb - Row inference —
InferRow,InferInsertRow,InferUpdateRow - Live query interface —
LiveQuery<T>(withsubscribe,subscribeDelta?,whenReady?),RowDelta<T> - Wire protocol —
PushRequest,PullResponse,ChangeOp,MutationEnvelope,SyncCookie,SyncError,PROTOCOL_VERSION,encodeCookie,decodeCookie,mergeCookie,cookieCovers - Encryption —
Envelope,EncryptionAAD,encryptField,decryptField,isEnvelope,validateEnvelope - PQ hybrid —
PqEnvelope,PqHybridProvider,encryptFieldPq,decryptFieldPq,isPqEnvelope,insecurePlaceholderProvider,plainDekProvider(deprecated alias) - CRDT primitives —
CrdtCounterMap,crdtIncrement,sumCrdtCounter,mergeCrdtCounter;PnCounterMap,pnIncrement,pnDecrement,pnRead,mergePnCounter;LwwRegister,lwwSet,lwwRead,mergeLwwRegister;OrSet,OrTag,orSetAdd,orSetRemove,orSetHas,orSetValues,mergeOrSet - Defaults + column reflection —
applyInsertDefaults,getTableMeta,Column,TableAuth,TableOptions
Full symbol index
Section titled “Full symbol index”The auto-generated Reference tree lives under
reference/generated/plasma-core/src.
Every symbol has its own page with the signature, params, return
type, and links back to its use in the Guides.
Where to go from here
Section titled “Where to go from here”Read this package alongside:
- Schema (Guide) — every column type + modifier
- Mutators (Guide) — the mutator contract
- CRDT columns (Guide) — the CRDT read/write helpers explained with examples
- Encryption (Guide) — Envelope wire format