Skip to content

Minor refactor in insert() and save()#58

Merged
DarkSide666 merged 18 commits intodevelopfrom
feature/change-insert-and-save
Jul 21, 2016
Merged

Minor refactor in insert() and save()#58
DarkSide666 merged 18 commits intodevelopfrom
feature/change-insert-and-save

Conversation

@romaninsh
Copy link
Copy Markdown
Member

@romaninsh romaninsh commented Jul 21, 2016

This PR changes slightly how save() and insert() work.

With a more dynamic nature of the Agile Data creating data takes requires a lot of flexibility. There are three ways to add data currently:

  • import([[data], [data], ..]); // returns $this
  • insert([data]); // returns clone of $this
  • save(); // save current record. Returns $this

The problems are:

  • return of insert() is not very usable.
  • save() requires to call set().

Proposal:

  • make insert() return ID instead of clone. (often ID is good enough!)
  • allow save([data]) which will combine set with save.

@DarkSide666 DarkSide666 merged commit 94e938b into develop Jul 21, 2016
@DarkSide666 DarkSide666 deleted the feature/change-insert-and-save branch July 21, 2016 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants