Re:Show HN: Fortune.js – High-level I/O for web applications
by nwmcsween on Sunday August 16, 2015 @04:44PM
(#10070201)
Axiom is a relational algebra library it doesn't abstract an rdbms at all. The way datamapper 2 worked from my understanding was virtus was a property like api e.g. a back end agnostic schema that describes the data, axiom takes the relations (if any) from virtus then hands off the relations to a back end such as SQL, mongo, graphql query generator and optimizer. Datamapper 2 from looking is a much better structure.
Looks like axiom is coupled to RDBMS, while fortune tries to abstract away the data store (there are mongodb & postgres adapters) by providing a contract for reading/writing data. virtus looks very similar to the implementation of record type in fortune, has some extra features such as type coercion and lacks some features such as foreign keys.
if you're interested in query implementation have a look at how the postgres adapter maps the adapter contract to sql: https://github.com/fortunejs/fortune-postgres/blob/master/li...