Function-based object queries
AssigneeAmazon Technologies, Inc.
InventorsUsman Ahmed Shami, Wei Xiao
Life of this patent
Estimating the term…
Abstract
A repository of key-value data may store a first object value having an internal structure of a hierarchy of sub-objects. The repository may receive a request to modify the first object, expressed as a function, without side effects, of one or more parameters. Values may be assigned to the one or more parameters by mapping from the parameters to locations in the hierarchy of sub-objects. A second object may be formed based on the return value of the function. The first object may be replaced in the repository by the second object.
Claims20
A method for querying within objects stored on a storage device, the method comprising:
- receiving a query of a first object stored on the storage device, the first object comprising a hierarchy of sub-objects, the query comprising a first function of at least a first parameter;
- assigning a value to the first parameter, the value based at least in part on mapping from the first parameter to a first location in the hierarchy of sub-objects;
- evaluating the first function based at least in part on the value assigned to the first parameter;
- forming a second object based on a copy of the first object in which a second location in the hierarchy of sub-objects, in the copy of the first object, is replaced by a return value of the first function;
- and
- returning the second object as a result of the query.
A non-transitory computer-readable storage medium having stored thereon instructions that, upon execution by one or more computing devices, cause the one or more computing devices at least to:
- receive a query of a first object stored in a database, the first object comprising a hierarchy of sub-objects, the query comprising a first function of at least a first parameter;
- assign a value to the first parameter, the value based at least in part on mapping from the first parameter to a first location in the hierarchy of sub-objects;
- calculate a result of the first function based at least in part on the value assigned to the first parameter;
- form a second object based on a copy of the first object by at least replacing, in the copy of the first object, a second location in the hierarchy of sub-objects with the result of the first function;
- and
- return the second object as the result of the query.
A system comprising:
- a memory to store machine-readable instructions, which as a result of being performed by a processor, cause the system at least to:
- receive a query of a first object stored on a storage device, the first object comprising a hierarchy of sub-objects, the query comprising a first function of at least a first parameter;
- assign a value to the first parameter, the value based at least in part on mapping from the first parameter to a first location in the hierarchy of sub-objects;
- evaluate the first function based at least in part on the value assigned to the first parameter;
- generate a second object based on a copy of the first object in which a second location in the hierarchy of sub-objects, in the copy of the first object, is replaced by a return value of the first function;
- and
- return the second object as a result of the query.
Dependencies are inferred from the claim text.