Package com.jcabi.dynamo.mock
Class H2Data
java.lang.Object
com.jcabi.dynamo.mock.H2Data
- All Implemented Interfaces:
MkData
Mock data in H2 database.
- Since:
- 0.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(String table, Attributes keys) Delete attributes from the given table.iterate(String table, Conditions conds) Iterate everything for the given table.Get keys for the given table.voidput(String table, Attributes attrs) Add new attribute into the given table.voidupdate(String table, Attributes keys, AttributeUpdates attrs) Add new attribute into the given table.With this table, that has given primary keys.
-
Constructor Details
-
H2Data
Public ctor.- Throws:
IOException- If fails
-
H2Data
Public ctor.- Parameters:
file- Where to keep the database
-
-
Method Details
-
keys
Description copied from interface:MkDataGet keys for the given table.- Specified by:
keysin interfaceMkData- Parameters:
table- Name of the table- Returns:
- All keys of the table
- Throws:
IOException- If fails
-
iterate
Description copied from interface:MkDataIterate everything for the given table.- Specified by:
iteratein interfaceMkData- Parameters:
table- Name of the tableconds- Conditions- Returns:
- All rows found
- Throws:
IOException- If fails
-
put
Description copied from interface:MkDataAdd new attribute into the given table.- Specified by:
putin interfaceMkData- Parameters:
table- Table nameattrs- Attributes to save- Throws:
IOException- If fails
-
update
Description copied from interface:MkDataAdd new attribute into the given table.- Specified by:
updatein interfaceMkData- Parameters:
table- Table namekeys- Keysattrs- Attributes to save- Throws:
IOException- If fails
-
delete
Description copied from interface:MkDataDelete attributes from the given table.- Specified by:
deletein interfaceMkData- Parameters:
table- Table namekeys- Keys- Throws:
IOException- If fails
-
with
With this table, that has given primary keys.- Parameters:
table- Table namekeys- Primary keysattrs- Attributes- Returns:
- New data, modified
- Throws:
IOException- If fails
-