transactor

package
v0.0.0-...-e82adf8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2017 License: MIT Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const (
	DbIdent          = 10 // :db/ident
	DbCardinality    = 41 // :db/cardinality
	DbCardinalityOne = 35 // :db.cardinality/one
	DbType           = 12 // :db/valueType
	DbTypeString     = 23 // :db.type/string
	DbPartDb         = 0  // :db.part/db
	DbPartTx         = 3  // :db.part/tx
	DbPartUser       = 4  // :db.part/user
	DbTxInstant      = 50 // :db/txInstant
)
View Source
const (
	Assert  = true
	Retract = false
)

Variables

View Source
var BootstrapTxs = []log.LogTx{
	log.LogTx{
		Id: uuidFromString("557ebd16-5ac9-72bf-4537-d79c1ac73dbf"),
		T:  0,
		Datoms: []index.Datom{
			index.NewDatom(0, 10, fressian.Keyword{Namespace: "db.part", Name: "db"}, 13194139533312, true),
			index.NewDatom(1, 10, fressian.Keyword{Namespace: "db", Name: "add"}, 13194139533312, true),
			index.NewDatom(2, 10, fressian.Keyword{Namespace: "db", Name: "retract"}, 13194139533312, true),
			index.NewDatom(3, 10, fressian.Keyword{Namespace: "db.part", Name: "tx"}, 13194139533312, true),
			index.NewDatom(4, 10, fressian.Keyword{Namespace: "db.part", Name: "user"}, 13194139533312, true),
			index.NewDatom(10, 10, fressian.Keyword{Namespace: "db", Name: "ident"}, 13194139533312, true),
			index.NewDatom(11, 10, fressian.Keyword{Namespace: "db.install", Name: "partition"}, 13194139533312, true),
			index.NewDatom(12, 10, fressian.Keyword{Namespace: "db.install", Name: "valueType"}, 13194139533312, true),
			index.NewDatom(13, 10, fressian.Keyword{Namespace: "db.install", Name: "attribute"}, 13194139533312, true),
			index.NewDatom(14, 10, fressian.Keyword{Namespace: "db.install", Name: "function"}, 13194139533312, true),
			index.NewDatom(15, 10, fressian.Keyword{Namespace: "db", Name: "excise"}, 13194139533312, true),
			index.NewDatom(16, 10, fressian.Keyword{Namespace: "db.excise", Name: "attrs"}, 13194139533312, true),
			index.NewDatom(17, 10, fressian.Keyword{Namespace: "db.excise", Name: "beforeT"}, 13194139533312, true),
			index.NewDatom(18, 10, fressian.Keyword{Namespace: "db.excise", Name: "before"}, 13194139533312, true),
			index.NewDatom(19, 10, fressian.Keyword{Namespace: "db.alter", Name: "attribute"}, 13194139533312, true),
			index.NewDatom(20, 10, fressian.Keyword{Namespace: "db.type", Name: "ref"}, 13194139533312, true),
			index.NewDatom(21, 10, fressian.Keyword{Namespace: "db.type", Name: "keyword"}, 13194139533312, true),
			index.NewDatom(22, 10, fressian.Keyword{Namespace: "db.type", Name: "long"}, 13194139533312, true),
			index.NewDatom(23, 10, fressian.Keyword{Namespace: "db.type", Name: "string"}, 13194139533312, true),
			index.NewDatom(24, 10, fressian.Keyword{Namespace: "db.type", Name: "boolean"}, 13194139533312, true),
			index.NewDatom(25, 10, fressian.Keyword{Namespace: "db.type", Name: "instant"}, 13194139533312, true),
			index.NewDatom(26, 10, fressian.Keyword{Namespace: "db.type", Name: "fn"}, 13194139533312, true),
			index.NewDatom(27, 10, fressian.Keyword{Namespace: "db.type", Name: "bytes"}, 13194139533312, true),
			index.NewDatom(35, 10, fressian.Keyword{Namespace: "db.cardinality", Name: "one"}, 13194139533312, true),
			index.NewDatom(36, 10, fressian.Keyword{Namespace: "db.cardinality", Name: "many"}, 13194139533312, true),
			index.NewDatom(37, 10, fressian.Keyword{Namespace: "db.unique", Name: "value"}, 13194139533312, true),
			index.NewDatom(38, 10, fressian.Keyword{Namespace: "db.unique", Name: "identity"}, 13194139533312, true),
			index.NewDatom(39, 10, fressian.Keyword{Namespace: "fressian", Name: "tag"}, 13194139533312, true),
			index.NewDatom(40, 10, fressian.Keyword{Namespace: "db", Name: "valueType"}, 13194139533312, true),
			index.NewDatom(41, 10, fressian.Keyword{Namespace: "db", Name: "cardinality"}, 13194139533312, true),
			index.NewDatom(42, 10, fressian.Keyword{Namespace: "db", Name: "unique"}, 13194139533312, true),
			index.NewDatom(43, 10, fressian.Keyword{Namespace: "db", Name: "isComponent"}, 13194139533312, true),
			index.NewDatom(44, 10, fressian.Keyword{Namespace: "db", Name: "index"}, 13194139533312, true),
			index.NewDatom(45, 10, fressian.Keyword{Namespace: "db", Name: "noHistory"}, 13194139533312, true),
			index.NewDatom(46, 10, fressian.Keyword{Namespace: "db", Name: "lang"}, 13194139533312, true),
			index.NewDatom(47, 10, fressian.Keyword{Namespace: "db", Name: "code"}, 13194139533312, true),
			index.NewDatom(48, 10, fressian.Keyword{Namespace: "db.lang", Name: "clojure"}, 13194139533312, true),
			index.NewDatom(49, 10, fressian.Keyword{Namespace: "db.lang", Name: "java"}, 13194139533312, true),
			index.NewDatom(50, 10, fressian.Keyword{Namespace: "db", Name: "txInstant"}, 13194139533312, true),
			index.NewDatom(51, 10, fressian.Keyword{Namespace: "db", Name: "fulltext"}, 13194139533312, true),
			index.NewDatom(52, 10, fressian.Keyword{Namespace: "db", Name: "fn"}, 13194139533312, true),
			index.NewDatom(53, 10, fressian.Keyword{Namespace: "db.bootstrap", Name: "part"}, 13194139533312, true),
		},
	},
	log.LogTx{
		Id: uuidFromString("557ebd16-6862-e198-da45-b3e3a57b0f85"),
		T:  54,
		Datoms: []index.Datom{
			index.NewDatom(0, 11, 0, 13194139533366, true),
			index.NewDatom(0, 11, 3, 13194139533366, true),
			index.NewDatom(0, 11, 4, 13194139533366, true),
			index.NewDatom(0, 12, 20, 13194139533366, true),
			index.NewDatom(0, 12, 21, 13194139533366, true),
			index.NewDatom(0, 12, 22, 13194139533366, true),
			index.NewDatom(0, 12, 23, 13194139533366, true),
			index.NewDatom(0, 12, 24, 13194139533366, true),
			index.NewDatom(0, 12, 25, 13194139533366, true),
			index.NewDatom(0, 12, 26, 13194139533366, true),
			index.NewDatom(0, 12, 27, 13194139533366, true),
			index.NewDatom(0, 13, 10, 13194139533366, true),
			index.NewDatom(0, 13, 11, 13194139533366, true),
			index.NewDatom(0, 13, 12, 13194139533366, true),
			index.NewDatom(0, 13, 13, 13194139533366, true),
			index.NewDatom(0, 13, 14, 13194139533366, true),
			index.NewDatom(0, 13, 15, 13194139533366, true),
			index.NewDatom(0, 13, 16, 13194139533366, true),
			index.NewDatom(0, 13, 17, 13194139533366, true),
			index.NewDatom(0, 13, 18, 13194139533366, true),
			index.NewDatom(0, 13, 19, 13194139533366, true),
			index.NewDatom(0, 13, 39, 13194139533366, true),
			index.NewDatom(0, 13, 40, 13194139533366, true),
			index.NewDatom(0, 13, 41, 13194139533366, true),
			index.NewDatom(0, 13, 42, 13194139533366, true),
			index.NewDatom(0, 13, 43, 13194139533366, true),
			index.NewDatom(0, 13, 44, 13194139533366, true),
			index.NewDatom(0, 13, 45, 13194139533366, true),
			index.NewDatom(0, 13, 46, 13194139533366, true),
			index.NewDatom(0, 13, 47, 13194139533366, true),
			index.NewDatom(0, 13, 50, 13194139533366, true),
			index.NewDatom(0, 13, 51, 13194139533366, true),
			index.NewDatom(0, 13, 52, 13194139533366, true),
			index.NewDatom(0, 14, 54, 13194139533366, true),
			index.NewDatom(0, 14, 55, 13194139533366, true),
			index.NewDatom(10, 40, 21, 13194139533366, true),
			index.NewDatom(10, 41, 35, 13194139533366, true),
			index.NewDatom(10, 42, 38, 13194139533366, true),
			index.NewDatom(11, 40, 20, 13194139533366, true),
			index.NewDatom(11, 41, 36, 13194139533366, true),
			index.NewDatom(12, 40, 20, 13194139533366, true),
			index.NewDatom(12, 41, 36, 13194139533366, true),
			index.NewDatom(13, 40, 20, 13194139533366, true),
			index.NewDatom(13, 41, 36, 13194139533366, true),
			index.NewDatom(14, 40, 20, 13194139533366, true),
			index.NewDatom(14, 41, 36, 13194139533366, true),
			index.NewDatom(15, 40, 20, 13194139533366, true),
			index.NewDatom(15, 41, 35, 13194139533366, true),
			index.NewDatom(16, 40, 20, 13194139533366, true),
			index.NewDatom(16, 41, 36, 13194139533366, true),
			index.NewDatom(17, 40, 22, 13194139533366, true),
			index.NewDatom(17, 41, 35, 13194139533366, true),
			index.NewDatom(18, 40, 25, 13194139533366, true),
			index.NewDatom(18, 41, 35, 13194139533366, true),
			index.NewDatom(19, 40, 20, 13194139533366, true),
			index.NewDatom(19, 41, 36, 13194139533366, true),
			index.NewDatom(20, 39, fressian.Keyword{Namespace: "", Name: "ref"}, 13194139533366, true),
			index.NewDatom(21, 39, fressian.Keyword{Namespace: "", Name: "key"}, 13194139533366, true),
			index.NewDatom(22, 39, fressian.Keyword{Namespace: "", Name: "int"}, 13194139533366, true),
			index.NewDatom(23, 39, fressian.Keyword{Namespace: "", Name: "string"}, 13194139533366, true),
			index.NewDatom(24, 39, fressian.Keyword{Namespace: "", Name: "bool"}, 13194139533366, true),
			index.NewDatom(25, 39, fressian.Keyword{Namespace: "", Name: "inst"}, 13194139533366, true),
			index.NewDatom(26, 39, fressian.Keyword{Namespace: "datomic", Name: "fn"}, 13194139533366, true),
			index.NewDatom(27, 39, fressian.Keyword{Namespace: "", Name: "bytes"}, 13194139533366, true),
			index.NewDatom(39, 40, 21, 13194139533366, true),
			index.NewDatom(39, 41, 35, 13194139533366, true),
			index.NewDatom(39, 44, true, 13194139533366, true),
			index.NewDatom(40, 40, 20, 13194139533366, true),
			index.NewDatom(40, 41, 35, 13194139533366, true),
			index.NewDatom(41, 40, 20, 13194139533366, true),
			index.NewDatom(41, 41, 35, 13194139533366, true),
			index.NewDatom(42, 40, 20, 13194139533366, true),
			index.NewDatom(42, 41, 35, 13194139533366, true),
			index.NewDatom(43, 40, 24, 13194139533366, true),
			index.NewDatom(43, 41, 35, 13194139533366, true),
			index.NewDatom(44, 40, 24, 13194139533366, true),
			index.NewDatom(44, 41, 35, 13194139533366, true),
			index.NewDatom(45, 40, 24, 13194139533366, true),
			index.NewDatom(45, 41, 35, 13194139533366, true),
			index.NewDatom(46, 40, 20, 13194139533366, true),
			index.NewDatom(46, 41, 35, 13194139533366, true),
			index.NewDatom(47, 40, 23, 13194139533366, true),
			index.NewDatom(47, 41, 35, 13194139533366, true),
			index.NewDatom(47, 51, true, 13194139533366, true),
			index.NewDatom(50, 40, 25, 13194139533366, true),
			index.NewDatom(50, 41, 35, 13194139533366, true),
			index.NewDatom(50, 44, true, 13194139533366, true),
			index.NewDatom(51, 40, 24, 13194139533366, true),
			index.NewDatom(51, 41, 35, 13194139533366, true),
			index.NewDatom(52, 40, 26, 13194139533366, true),
			index.NewDatom(52, 41, 35, 13194139533366, true),
			index.NewDatom(54, 10, fressian.Keyword{Namespace: "db.fn", Name: "retractEntity"}, 13194139533366, true),
			index.NewDatom(54, 46, 48, 13194139533366, true),
			index.NewDatom(54, 47, "(clojure.core/fn [db e] (datomic.builtins/build-retract-args db e))", 13194139533366, true),
			index.NewDatom(55, 10, fressian.Keyword{Namespace: "db.fn", Name: "cas"}, 13194139533366, true),
			index.NewDatom(55, 46, 48, 13194139533366, true),
			index.NewDatom(55, 47, "(clojure.core/fn [db e a ov nv] (datomic.builtins/compare-and-swap db e a ov nv))", 13194139533366, true),
			index.NewDatom(13194139533366, 50, time.Unix(0, 0), 13194139533366, true),
		},
	},
	log.LogTx{
		Id: uuidFromString("557ebd16-f9de-b62a-af68-1e01f49bc7ab"),
		T:  56,
		Datoms: []index.Datom{
			index.NewDatom(0, 12, 56, 13194139533368, true),
			index.NewDatom(0, 12, 57, 13194139533368, true),
			index.NewDatom(0, 12, 58, 13194139533368, true),
			index.NewDatom(0, 12, 59, 13194139533368, true),
			index.NewDatom(0, 12, 60, 13194139533368, true),
			index.NewDatom(0, 12, 61, 13194139533368, true),
			index.NewDatom(0, 13, 62, 13194139533368, true),
			index.NewDatom(56, 10, fressian.Keyword{Namespace: "db.type", Name: "uuid"}, 13194139533368, true),
			index.NewDatom(56, 39, fressian.Keyword{Namespace: "", Name: "uuid"}, 13194139533368, true),
			index.NewDatom(57, 10, fressian.Keyword{Namespace: "db.type", Name: "double"}, 13194139533368, true),
			index.NewDatom(57, 39, fressian.Keyword{Namespace: "", Name: "double"}, 13194139533368, true),
			index.NewDatom(58, 10, fressian.Keyword{Namespace: "db.type", Name: "float"}, 13194139533368, true),
			index.NewDatom(58, 39, fressian.Keyword{Namespace: "", Name: "float"}, 13194139533368, true),
			index.NewDatom(59, 10, fressian.Keyword{Namespace: "db.type", Name: "uri"}, 13194139533368, true),
			index.NewDatom(59, 39, fressian.Keyword{Namespace: "", Name: "uri"}, 13194139533368, true),
			index.NewDatom(60, 10, fressian.Keyword{Namespace: "db.type", Name: "bigint"}, 13194139533368, true),
			index.NewDatom(60, 39, fressian.Keyword{Namespace: "", Name: "bigint"}, 13194139533368, true),
			index.NewDatom(61, 10, fressian.Keyword{Namespace: "db.type", Name: "bigdec"}, 13194139533368, true),
			index.NewDatom(61, 39, fressian.Keyword{Namespace: "", Name: "bigdec"}, 13194139533368, true),
			index.NewDatom(62, 10, fressian.Keyword{Namespace: "db", Name: "doc"}, 13194139533368, true),
			index.NewDatom(62, 40, 23, 13194139533368, true),
			index.NewDatom(62, 41, 35, 13194139533368, true),
			index.NewDatom(62, 51, true, 13194139533368, true),
			index.NewDatom(13194139533368, 50, time.Unix(0, 0), 13194139533368, true),
		},
	},
	log.LogTx{
		Id: uuidFromString("557ebd16-b996-dbd4-e22b-3096b4f70a73"),
		T:  63,
		Datoms: []index.Datom{
			index.NewDatom(0, 62, "Name of the system partition. The system partition includes the core of datomic, as well as user schemas: type definitions, attribute definitions, partition definitions, and data function definitions.", 13194139533375, true),
			index.NewDatom(1, 62, "Primitive assertion. All transactions eventually reduce to a collection of primitive assertions and retractions of facts, e.g. [:db/add fred :age 42].", 13194139533375, true),
			index.NewDatom(2, 62, "Primitive retraction. All transactions eventually reduce to a collection of assertions and retractions of facts, e.g. [:db/retract fred :age 42].", 13194139533375, true),
			index.NewDatom(3, 62, "Partition used to store data about transactions. Transaction data always includes a :db/txInstant which is the transaction's timestamp, and can be extended to store other information at transaction granularity.", 13194139533375, true),
			index.NewDatom(4, 62, "Name of the user partition. The user partition is analogous to the default namespace in a programming language, and should be used as a temporary home for data during interactive development.", 13194139533375, true),
			index.NewDatom(10, 62, "Attribute used to uniquely name an entity.", 13194139533375, true),
			index.NewDatom(11, 62, "System attribute with type :db.type/ref. Asserting this attribute on :db.part/db with value v will install v as a partition.", 13194139533375, true),
			index.NewDatom(12, 62, "System attribute with type :db.type/ref. Asserting this attribute on :db.part/db with value v will install v as a value type.", 13194139533375, true),
			index.NewDatom(13, 62, "System attribute with type :db.type/ref. Asserting this attribute on :db.part/db with value v will install v as an attribute.", 13194139533375, true),
			index.NewDatom(14, 62, "System attribute with type :db.type/ref. Asserting this attribute on :db.part/db with value v will install v as a data function.", 13194139533375, true),
			index.NewDatom(19, 62, "System attribute with type :db.type/ref. Asserting this attribute on :db.part/db with value v will alter the definition of existing attribute v.", 13194139533375, true),
			index.NewDatom(20, 62, "Value type for references. All references from one entity to another are through attributes with this value type.", 13194139533375, true),
			index.NewDatom(21, 62, "Value type for keywords. Keywords are used as names, and are interned for efficiency. Keywords map to the native interned-name type in languages that support them.", 13194139533375, true),
			index.NewDatom(22, 62, "Fixed integer value type. Same semantics as a Java long: 64 bits wide, two's complement binary representation.", 13194139533375, true),
			index.NewDatom(23, 62, "Value type for strings.", 13194139533375, true),
			index.NewDatom(24, 62, "Boolean value type.", 13194139533375, true),
			index.NewDatom(25, 62, "Value type for instants in time. Stored internally as a number of milliseconds since midnight, January 1, 1970 UTC. Representation type will vary depending on the language you are using.", 13194139533375, true),
			index.NewDatom(26, 62, "Value type for database functions. See Javadoc for Peer.function.", 13194139533375, true),
			index.NewDatom(27, 62, "Value type for small binaries. Maps to byte array on the JVM.", 13194139533375, true),
			index.NewDatom(35, 62, "One of two legal values for the :db/cardinality attribute. Specify :db.cardinality/one for single-valued attributes, and :db.cardinality/many for many-valued attributes.", 13194139533375, true),
			index.NewDatom(36, 62, "One of two legal values for the :db/cardinality attribute. Specify :db.cardinality/one for single-valued attributes, and :db.cardinality/many for many-valued attributes.", 13194139533375, true),
			index.NewDatom(37, 62, "Specifies that an attribute's value is unique. Attempts to create a new entity with a colliding value for a :db.unique/value will fail.", 13194139533375, true),
			index.NewDatom(38, 62, "Specifies that an attribute's value is unique. Attempts to create a new entity with a colliding value for a :db.unique/value will become upserts.", 13194139533375, true),
			index.NewDatom(39, 62, "Keyword-valued attribute of a value type that specifies the underlying fressian type used for serialization.", 13194139533375, true),
			index.NewDatom(40, 62, "Property of an attribute that specifies the attribute's value type. Built-in value types include, :db.type/keyword, :db.type/string, :db.type/ref, :db.type/instant, :db.type/long, :db.type/bigdec, :db.type/boolean, :db.type/float, :db.type/uuid, :db.type/double, :db.type/bigint,  :db.type/uri.", 13194139533375, true),
			index.NewDatom(41, 62, "Property of an attribute. Two possible values: :db.cardinality/one for single-valued attributes, and :db.cardinality/many for many-valued attributes. Defaults to :db.cardinality/one.", 13194139533375, true),
			index.NewDatom(42, 62, "Property of an attribute. If value is :db.unique/value, then attribute value is unique to each entity. Attempts to insert a duplicate value for a temporary entity id will fail. If value is :db.unique/identity, then attribute value is unique, and upsert is enabled. Attempting to insert a duplicate value for a temporary entity id will cause all attributes associated with that temporary id to be merged with the entity already in the database. Defaults to nil.", 13194139533375, true),
			index.NewDatom(43, 62, "Property of attribute whose vtype is :db.type/ref. If true, then the attribute is a component of the entity referencing it. When you query for an entire entity, components are fetched automatically. Defaults to nil.", 13194139533375, true),
			index.NewDatom(44, 62, "Property of an attribute. If true, create an AVET index for the attribute. Defaults to false.", 13194139533375, true),
			index.NewDatom(45, 62, "Property of an attribute. If true, past values of the attribute are not retained after indexing. Defaults to false.", 13194139533375, true),
			index.NewDatom(46, 62, "Attribute of a data function. Value is a keyword naming the implementation language of the function. Legal values are :db.lang/java and :db.lang/clojure", 13194139533375, true),
			index.NewDatom(47, 62, "String-valued attribute of a data function that contains the function's source code.", 13194139533375, true),
			index.NewDatom(48, 62, "Value of :db/lang attribute, specifying that a data function is implemented in Clojure.", 13194139533375, true),
			index.NewDatom(49, 62, "Value of :db/lang attribute, specifying that a data function is implemented in Java.", 13194139533375, true),
			index.NewDatom(50, 62, "Attribute whose value is a :db.type/instant. A :db/txInstant is recorded automatically with every transaction.", 13194139533375, true),
			index.NewDatom(51, 62, "Property of an attribute. If true, create a fulltext search index for the attribute. Defaults to false.", 13194139533375, true),
			index.NewDatom(52, 62, "A function-valued attribute for direct use by transactions and queries.", 13194139533375, true),
			index.NewDatom(54, 62, "Retract all facts about an entity, including references from other entities and component attributes recursively.", 13194139533375, true),
			index.NewDatom(55, 62, "Compare and swap the value of an entity's attribute.", 13194139533375, true),
			index.NewDatom(56, 62, "Value type for UUIDs. Maps to java.util.UUID on the JVM.", 13194139533375, true),
			index.NewDatom(57, 62, "Floating point value type. Same semantics as a Java double: double-precision 64-bit IEEE 754 floating point.", 13194139533375, true),
			index.NewDatom(58, 62, "Floating point value type. Same semantics as a Java float: single-precision 32-bit IEEE 754 floating point.", 13194139533375, true),
			index.NewDatom(59, 62, "Value type for URIs. Maps to java.net.URI on the JVM.", 13194139533375, true),
			index.NewDatom(60, 62, "Value type for arbitrary precision integers. Maps to java.math.BigInteger on the JVM.", 13194139533375, true),
			index.NewDatom(61, 62, "Value type for arbitrary precision floating point numbers. Maps to java.math.BigDecimal on the JVM.", 13194139533375, true),
			index.NewDatom(62, 62, "Documentation string for an entity.", 13194139533375, true),
			index.NewDatom(13194139533375, 50, time.Unix(0, 0), 13194139533375, true),
		},
	},
}
View Source
var InitialDb *database.Db

Functions

func EntityFromValue

func EntityFromValue(val interface{}) (database.HasLookup, error)

func HasLookupFromEDN

func HasLookupFromEDN(s string) (database.HasLookup, error)

func Part

func Part(id int) int

Types

type Datum

type Datum struct {
	Op bool
	E  database.HasLookup
	A  database.HasLookup
	V  Value
}

func (Datum) Resolve

func (d Datum) Resolve(db *database.Db) ([]RawDatum, error)

func (Datum) Retraction

func (d Datum) Retraction() Datum

type RawDatum

type RawDatum struct {
	Op bool
	E  int
	A  int
	V  index.Value
}

func (RawDatum) Resolve

func (d RawDatum) Resolve(db *database.Db) ([]RawDatum, error)

func (RawDatum) Retraction

func (d RawDatum) Retraction() RawDatum

type TxDatum

type TxDatum interface {
	Resolve(db *database.Db) ([]RawDatum, error)
}

func TxDataFromEDN

func TxDataFromEDN(s string) ([]TxDatum, error)

type TxFn

type TxFn func(db *database.Db) ([]RawDatum, error)

func FnCompareAndSwap

func FnCompareAndSwap(entity database.HasLookup, attribute database.HasLookup, oldValue *index.Value, newValue *index.Value) TxFn

func FnRetractEntity

func FnRetractEntity(id database.HasLookup) TxFn

func (TxFn) Resolve

func (f TxFn) Resolve(db *database.Db) ([]RawDatum, error)

type TxMap

type TxMap struct {
	Id         database.HasLookup
	Attributes map[database.Keyword][]Value
}

func (TxMap) Resolve

func (m TxMap) Resolve(db *database.Db) ([]RawDatum, error)

type TxResult

type TxResult struct {
	DbBefore *database.Db
	DbAfter  *database.Db
	Tempids  map[int]int
	Datoms   []index.Datom
}

func Transact

func Transact(db *database.Db, txData []TxDatum) (*txlog.LogTx, *TxResult, error)

type Value

type Value struct {
	// contains filtered or unexported fields
}

func NewValue

func NewValue(value interface{}) Value

func (Value) Get

func (v Value) Get(db *database.Db, isRef bool) (*index.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL