getStoreQuery method

Query getStoreQuery(
  1. DatabaseStorable element, {
  2. bool updateIfExists = false,
})
inherited

generates a create or update query depending if the object should be updated if it exists

Implementation

Query getStoreQuery(T element, {bool updateIfExists = false}) {
  if (updateIfExists) {
    return getUpdateQuery(element);
  }

  return getCreateQuery(element);
}