Repository navigation
v0.14.0
foldkit-entity 0.7.0; foldkit-remote 0.11.0; foldkit-remote-server
0.11.0; foldkit-remote-drizzle 0.9.1. Republished to re-pin:
foldkit-cms 0.4.1, foldkit-cms-drizzle 0.4.1, foldkit-crud 0.5.1,
foldkit-form 0.4.1, foldkit-mixins-crud 0.6.1 and foldkit-mixins-form
0.4.1, each of which pins a bumped package exactly. Every other package is
unchanged.
Queries mean the same thing everywhere. Nine reports from testing a second,
independent implementation against the published packages: a query is now a
frozen value, a shared node costs one visit, dependencies are reported per
Entity identity, contains folds the same way in memory and in SQL, and an
ordering refusal reads the same on every engine. On the server, related
entities serve their relations, field names from Object.prototype are
refused, and the memory backend can be served over a real transport. On the
client, Remote.clientLayer takes the stock RpcClient as it is.
Upgrading from 0.13
- A dependency's field names its owner.
dependenciesOfand
Query.dependenciesreturn{ entity, key, owner }per field. Code that
compares the whole entry withtoEqualneeds theownertoo, or compares
entityandkeyalone.Data.explainis unchanged. Exprnodes are frozen. Code that changed a node after building it
now throws in strict mode. Build a new node instead.evaluaterefuses more, the same way every time. A null order key is
refused wherever it is, including where an earlier term already separates
the rows, andcontainsrefuses text holding a NUL character, as the SQL
compiler now does.containsfolds ASCII letters only, so a search that
relied onÉmatchingéin memory no longer does; it never did in SQL.
Added
foldkit-remote-server,MemoryBackend.server: the server definition
a memory backend answers through, so it can be served over a real
transport,RemoteRpc.toLayer(RemoteServer.handlers(backend.server, undefined)), instead of copying the backend's private read and query
closures (#140).
Changed
foldkit-entity, a field's dependency names its owner:
dependenciesOfandQuery.dependenciesreport each field as
{ entity, key, owner }and keep one entry per Entity identity, so two
Entities defined with the same name are no longer one dependency.
Data.explainkeeps the plain{ entity, key }form, which serializes and
is unambiguous for a query reading one Entity (#139).foldkit-entity,evaluatechecks an ordering before sorting: every
term over every matched row, in row order. A refusal now names the first row
that breaks the order, the same on every engine, rather than whichever pair
the engine's sort compared first; and a null key is refused wherever it is,
even where an earlier term already separates the rows. One matched row is
never refused (#142).
Fixed
foldkit-entity,Exprnodes are frozen: a predicate could be changed
afterQuery.wherechecked it, changing a built query's results or slipping
another Entity's field past the ownership check. Every node is frozen as it
is built (#138).foldkit-entity, a shared expression node is visited once: the
ownership check and the dependency walk followed every path to a node, so
Expr.eq(n, n)nested a dozen deep took thousands of visits. Each walk keeps
the nodes it has seen (#137).foldkit-entity,containsinevaluatefolds ASCII only: it folded
full Unicode while the compiled SQL folds ASCII, soÉmatchedéin one
and not the other. It folds ASCII letters only now, asExpr.contains
documents, and text holding a NUL character is refused by both
interpreters. Two conformance cases pin the folding (#136).foldkit-remote,Remote.clientLayerwith the stockRpcClient: it
refused the clientRpcClient.make(RemoteRpc)builds, whose calls can also
fail withRpcClientError, so every application wrote an adapter. It takes
that client as it is now, and a transport failure becomes the call's own
Remote error (RemoteReadError,RemoteQueryError,RemoteMutationError,
RemoteLiveError), which the UI shows and retries, rather than a defect.
RemoteRpcClientgained aTransportErrorparameter,neverby default,
so in-process handlers are unchanged (#141).foldkit-remote-server,RemoteServer.entitywith a related Entity: it
declared only the Entity's scalarfields, so a relation such asowner
was settled as withheld and a nested selection through it returned nothing.
It declares the Entity'smembersnow: fields, relations and derived
members (#135).foldkit-remote-server, requested fields named likeObject.prototype
members: a request forconstructorortoStringwas answered from the
prototype by the memory source and renamed to it by the read path, so the
field was neither answered nor settled. Field presence is an own-property
check, renames are looked up the same way, and the alias maps have no
prototype, so__proto__@first=1is an alias like any other (#143).