kodemore / amano Goto Github PK
View Code? Open in Web Editor NEWAWS DynamoDB Abstraction Layer build on Table Data Gateway Pattern
License: GNU General Public License v3.0
AWS DynamoDB Abstraction Layer build on Table Data Gateway Pattern
License: GNU General Public License v3.0
amano.VersionedItem
class should automatically recognised by save
, put
and update
commands as a versioned (event sourced) entity. Each time a write is made with a versioned item, there should be two writes:
0
n
, where n
is an integer number increased every time item is persisted.Version of the item should be kept as a part of sort-key. The following is the schema for the versioned sort-key:
{n}:{sort_key}
n
is the version numbersort_key
is the user's sort keyEvery time read operation is made to a versioned item with a condition, that condition should be automatically ammended and sort key should be either added or modified in the expression to filter only for the latest version 0
.
This behaviour can be easily ignored in the userland if two representations are made for the same item, one is versioned the other is a normal item.
amano.VersionedItem
TBC
Possible solution might be using a context to write multiple items to the table
Add support for PartiQL queries in amano.Table
Save method should consider the state of the item passed to it. If the item is in a new state, a put command should be executed. If the item is in dirty state an update command should be executed, otherwise save should return false.
amano.Table.save
amano._ItemState
amano.Item._state
Scan method should support standard condition expression and return a cursor. Scan method should also support consistent reads and limit parameter.
amano.Table.scan
amano.condition.Condition
At the moment count in cursor is calculated by retrieving all the items from dynamodb. We could optimise this behaviour by utilising ScannedCount
and Count
information: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Count
Additionally we could abstract all the informations returned by dynamodb and provide it back to user.
amano.Cursor.count
amano.Cursor
Add delete
method to the table class with conditional deletion support.
amano (0.2.0) depends on chili (>=1.7.0,<2.0.0) but there are now chili versions >2.0.0
Support batch write operation. There should be three methods provided in the table batch_save
and batch_delete
and batch_write
.
batch_save
should be used to persist multiple items in the table at once
batch_delete
should be used to remove multiple items from the table at once
batch_write
should be capable of removing or persisting items
All of the methods above should probably support conditional statements.
amano.Table
amano.Table.batch_write
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.