Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: WriteOperation POJO to store results of CRUDs #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinceh121
Copy link

Reason for the change
Issue #18 check box "TableOperation"
Notably, the ability for applications to read the generated_keys attribute on inserts is essential.

Description
Creates the WriteOperation and Change POJOs that contain results of the 4 CRUD commands.
The issue specified a POJO also used for the result of the sync command, but as its schema is totally different, WriteOperation only works for CRUD commands.

Code examples

Connection con = r.connection().connect();

Map<String, Object> map = new HashMap<>();
map.put("value", Math.random());

Result<WriteOperation> res = r.table("test")
		.insert(map)
		.run(con, WriteOperation.class);
System.out.println(res.single());

WriteOperation{generatedKeys=[3ee14074-c36b-4ecb-b3f5-c8f2186eec73], changes=[], inserted=1, replaced=0, unchanged=0, deleted=0, skipped=0, errors=0, firstError=null, warnings=null}

Checklist

References
Reference pages of the insert, update, delete and replace commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant