[TARGET commit()]
6018
public Key commit() {
    Datastore datastore = transaction.getDatastore();
    // [START commit]
    // create an entity
    KeyFactory keyFactory = datastore.newKeyFactory().setKind("MyKind");
    Key key = datastore.allocateId(keyFactory.newKey());
    Entity entity = Entity.newBuilder(key).set("description", "commit()").build();

    // add the entity and commit
    try {
      transaction.put(entity);
      transaction.commit();
    } catch (DatastoreException ex) {
      // handle exception
    }
    // [END commit]

    return key;
  }
276061
def commit(self):
        """"""
        for _, save_dir in self._save_dirs.items():
            save_dir.cleanup()
        self._moves = []
        self._save_dirs = {}
679256
synchronized void prepareCommit(Session session) {

        RowActionBase action = this;

        do {
            if (action.session == session && action.commitTimestamp == 0) {
                action.prepared = true;
            }

            action = action.next;
        } while (action != null);
    }
648968
def commit(self):
        '''
        
        '''
        if self._fetched is None:
            raise RuntimeError('commit() was called but nothing was fetched')
        self._cache = self._cache[self._fetched:]
        self._fetched = None
884427
def git_commit(targets, message, force=False, sign=False):
    
    root = get_root()
    target_paths = []
    for t in targets:
        target_paths.append(os.path.join(root, t))

    with chdir(root):
        result = run_command('git add{} {}'.format(' -f' if force else '', ' '.join(target_paths)))
        if result.code != 0:
            return result

        return run_command('git commit{} -m "{}"'.format(' -S' if sign else '', message))
405701
public function commit() {
		
		if(null === $this -> connection) {
			$this -> connect();
		}

		$this -> connection -> commit();
		$this -> connection -> autocommit(true);

		return $this;
	}
32001
@Override
    public void commit() throws SQLException
    {
        checkClosed();
        if (props.getProperty(COMMIT_THROW_EXCEPTION, "true").equalsIgnoreCase("true")) {
            throw SQLError.noSupport();
        }
    }
1310570
public function onKernelTerminate()
    {
        foreach ($this->managers as $key => $value) {
            if ($value['force_commit']) {
                try {
                    /** @var Manager $manager */
                    $manager = $this->container->get(sprintf('es.manager.%s', $key));
                } catch (\Exception $e) {
                    continue;
                }
                $manager->commit();
            }
        }
    }
411087
def commit(self):
        """"""
        if self.session is not None:
            logger.info("committing transaction in %s" % self)
            tmp = self.stable
            self.stable, self.session = self.session, None
            self.istable = 1 - self.istable
            self.write_istable()
            tmp.close() # don't wait for gc, release resources manually
            self.lock_update.release()
        else:
            logger.warning("commit called but there's no open session in %s" % self)
1168446
private static function commit()
    {
        $transaction = env('SIMPLES_TRANSACTION_CLASS', '\\Simples\\Persistence\\Transaction');
        if (!class_exists($transaction)) {
            return;
        }

        if (!method_exists($transaction, 'commit')) {
            throw new ErrorException("The transaction commit method was not found");
        }

        /** @noinspection PhpUnnecessaryFullyQualifiedNameInspection, PhpUndefinedMethodInspection */
        if (!$transaction::commit()) {
            throw new ErrorException("Transaction can't commit the changes");
        }
    }
1082706
public function commit()
	{
		$this->sourceWidth = $this->frameWidth;
		$this->sourceHeight = $this->frameHeight;
		$this->offsetX = 0;
		$this->offsetY = 0;
		$this->scaleWidth = $this->frameWidth;
		$this->scaleHeight = $this->frameHeight;

		$this->getFocalPoint();
	}
293103
CommitResult commit(File project, String message) {
		try (Git git = this.gitFactory.open(file(project))) {
			git.add().addFilepattern(".").call();
			git.commit().setAllowEmpty(false).setMessage(message).call();
			log.info("Commited successfully with message [" + message + "]");
			return CommitResult.SUCCESSFUL;
		}
		catch (EmptyCommitException e) {
			log.info("There were no changes detected. Will not commit an empty commit");
			return CommitResult.EMPTY;
		}
		catch (Exception e) {
			throw new IllegalStateException(e);
		}
	}
654031
public void commit() {
        if (checkSession()) {
            return;
        }

        if (log.isDebugEnabled()) {
            log.debug(String.format("Committing transactional %s@%x",
                    sqlSession.getClass().getSimpleName(),
                    sqlSession.hashCode()));
        }

        sqlSession.commit();
    }
553736
function commit()
    {
        if ($this->transaction_level > 0){
            $this->transaction_level--;
            if ($this->transaction_level == 0){
                return parent::commit();
            }
            return true;
        }
        return false;
    }
114273
@Override
    public void actionCommit() {

        try {
            int action = -1;
            if (isOnline() && isOffline()) {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_ENTRIES;
                }
            } else if (isOnline()) {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_ONLINE_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_ONLINE_ENTRIES;
                }
            } else if (isOffline()) {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_OFFLINE_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_OFFLINE_ENTRIES;
                }
            } else {
                if (getMode().equals(MODE_ALL)) {
                    action = CmsFlexCache.CLEAR_ALL;
                } else {
                    action = CmsFlexCache.CLEAR_ENTRIES;
                }
            }
            OpenCms.fireCmsEvent(
                new CmsEvent(
                    I_CmsEventListener.EVENT_FLEX_CACHE_CLEAR,
                    Collections.<String, Object> singletonMap(CmsFlexCache.CACHE_ACTION, new Integer(action))));
        } catch (Exception e) {
            setCommitErrors(Collections.singletonList((Throwable)e));
        }
    }
82096
private Statement compileCommit() {

        boolean chain = false;

        read();
        readIfThis(Tokens.WORK);

        if (token.tokenType == Tokens.AND) {
            read();

            if (token.tokenType == Tokens.NO) {
                read();
            } else {
                chain = true;
            }

            readThis(Tokens.CHAIN);
        }

        String    sql  = getLastPart();
        Object[]  args = new Object[]{ Boolean.valueOf(chain) };
        Statement cs = new StatementSession(StatementTypes.COMMIT_WORK, args);

        return cs;
    }
104849
public function commit()
    {
        try {
            $this->gateway->commit();
        } catch (\RuntimeException $e) {
            throw new OrmException("Unable to commit changes.\n" . $e->getMessage(), 0, $e);
        }
    }