Commit mutations to the database.

        :rtype: datetime
        :returns: timestamp of the committed changes.
        :raises ValueError: if there are no mutations to commit.
970477
def commit(self):
        
        self._check_state()

        database = self._session._database
        api = database.spanner_api
        metadata = _metadata_with_prefix(database.name)
        response = api.commit(
            self._session.name,
            self._mutations,
            transaction_id=self._transaction_id,
            metadata=metadata,
        )
        self.committed = _pb_timestamp_to_datetime(response.commit_timestamp)
        del self._session._transaction
        return self.committed
284961
def commit(self) -> None:
        
        if len(self._transactions) == 0:
            raise RuntimeError("commit called outside transaction")

        # If we have nested transactions, we don't actually commit, but push
        # rollbacks up to previous transaction.
        if len(self._transactions) > 1:
            for on_rollback in reversed(self._transactions[-1]):
                self._transactions[-2].insert(0, on_rollback)

        _debug("commit")
        self.reset()
884179
def get_newest_commit_date(self):
        '''
        
        '''
        newest_commit = self.get_newest_commit()
        return self.git.get_commit_date(newest_commit, self.tz_name)
179035
def commit(self):
        
        if hasattr(self.local, 'tx') and self.local.tx:
            tx = self.local.tx.pop()
            tx.commit()
            self._flush_tables()
571391
def commit(self):
        
        assert self.record
        result = self.files_written, self.dirs_created
        self._init_record()
        return result
535567
def commit_when_no_transaction(f):
    ''''''
    def _(self, *args, **kwargs):
        r = f(self, *args, **kwargs)
        return self.session.add(self) if self.session is not None else r
    _.__name__ = f.__name__
    _.__doc__ = f.__doc__
    return _
633447
public void commit() throws DBException
    {
        super.commit();   // Will throw an error if something is not set up right.
        try   {
            if (this.getRemoteDatabase() != null)
            {
                synchronized (this.getSyncObject(this.getRemoteDatabase()))
                {
                    this.getRemoteDatabase().commit();
                }
            }
        } catch (RemoteException ex)    {
            Utility.getLogger().warning("Remote commit error: " + ex.getMessage());
            ex.printStackTrace();
        } catch (Exception ex)  {
            throw this.convertError(ex);
        }
    }
1205256
def last_update_time(self, value):
        
        if isinstance(value, (datetime.datetime,)):
            self._last_update_time = value
        else:
            raise ValueError("Expect last_update_time to be a datetime")
104505
def commit(ctx, f, force_yes, date):
    
    timesheet_collection = get_timesheet_collection_for_context(ctx, f)

    if not date and not force_yes:
        non_workday_entries = timesheet_collection.entries.filter(ignored=False, pushed=False, current_workday=False)

        if non_workday_entries:
            if not ctx.obj['view'].confirm_commit_entries(non_workday_entries):
                ctx.obj['view'].msg("Ok then.")
                return

    ctx.obj['view'].pushing_entries()
    backends_entries = defaultdict(list)

    try:
        # Push entries
        for timesheet in timesheet_collection.timesheets:
            entries_to_push = get_entries_to_push(
                timesheet, date, ctx.obj['settings']['regroup_entries']
            )

            for (entries_date, entries) in entries_to_push.items():
                for entry in entries:
                    backend_name = aliases_database[entry.alias].backend
                    backend = plugins_registry.get_backend(backend_name)
                    backends_entries[backend].append(entry)

                    try:
                        additional_info = backend.push_entry(entries_date, entry)
                    except KeyboardInterrupt:
                        entry.push_error = ("Interrupted, check status in"
                                            " backend")
                        raise
                    except Exception as e:
                        additional_info = None
                        entry.push_error = six.text_type(e)
                    else:
                        entry.push_error = None
                    finally:
                        ctx.obj['view'].pushed_entry(entry, additional_info)

        # Call post_push_entries on backends
        backends_post_push(backends_entries)
    except KeyboardInterrupt:
        pass
    finally:
        comment_timesheets_entries(timesheet_collection, date)

    ignored_entries = timesheet_collection.entries.filter(date=date, ignored=True, unmapped=False, pushed=False)
    ignored_entries_list = []
    for (entries_date, entries) in six.iteritems(ignored_entries):
        ignored_entries_list.extend(entries)

    all_entries = itertools.chain(*backends_entries.values())
    ctx.obj['view'].pushed_entries_summary(list(all_entries),
                                           ignored_entries_list)
1089918
def update(self, timedelta, *args, **kwargs):
        

        # TODO move time management somewhere else...
        self.last_update += timedelta
        # if shutdown we want to bypass the update_interval check
        # if shutting_down:
        #     self.interface.update(shutting_down=shutting_down)
        #     return 0  # return 0 as success since we arrived here without exception
        # else
        if self.last_update > self.update_interval:
            self.last_update = 0
            self.interface.update()
353993
def on_commit(self, changes):
        
        if _get_config(self)['enable_indexing'] is False:
            return None

        for wh in self.whoosheers:
            if not wh.auto_update:
                continue
            writer = None
            for change in changes:
                if change[0].__class__ in wh.models:
                    method_name = '{0}_{1}'.format(change[1], change[0].__class__.__name__.lower())
                    method = getattr(wh, method_name, None)
                    if method:
                        if not writer:
                            writer = type(self).get_or_create_index(_get_app(self), wh).\
                                writer(timeout=_get_config(self)['writer_timeout'])
                        method(writer, change[0])
            if writer:
                writer.commit()
851350
def apply_persistence_timestamps
      self.updated_at   = Time.now if self.class.attribute_names.include?(:updated_at)
      self.created_at ||= Time.now if self.class.attribute_names.include?(:created_at)
    end
1083853
def save(self, commit=True):
        

        db.session.add(self)
        if commit:
            db.session.commit()
        return self
40039
def commit(self, commit):
		
		try:
			return self._commitData(self.repo.get_commit(commit))
		except (ValueError, KeyError, GithubException):
			raise KeyError("Commit %s not found" % commit)
98061
public void commit() throws DBException
    {
        if (DBConstants.FALSE.equalsIgnoreCase(this.getProperty(SQLParams.AUTO_COMMIT_PARAM)))
        {
            if (!(this.getDatabaseOwner() instanceof RecordOwner))
                throw new DatabaseException("Transactions requires DB RecordOwnership");
        }
        else
            throw new DatabaseException("Auto-commit enabled");
    }
827094
def Commit(self):
		
		self.lock.acquire()
		try:
			for bucket in self.connections.values():
				try:
					for conn in bucket:
						conn.lock()
						try:
							conn.commit()
							conn.release()
						except Exception:
							conn.release()
				except Exception:
					pass
		finally:
			self.lock.release()
286088
def commit(self):
		
		try:
			if self.connection is not None:
				self.connection.commit()
				self._updateCheckTime()
				self.release()
		except Exception, e:
			pass