Create table if not exist.
@param string table
@param \Closure $callback
339840
public function table($table, \Closure $callback)
	{
		try
		{
			parent::create($table, $callback);
		}
		catch(\Exception $e)
		{
			try
			{
				parent::table($table, $callback);
			}
			catch(\Exception $e)
			{
				echo $e->getMessage();
			}
		}
	}
713363
public function mapSurname(Closure $callback)
    {
        if (!static::$surnamesHandle instanceof SplFileObject) {
            static::$surnamesHandle = $this->openFile($this->path.'/surnames');
        }

        $this->traversing($this->getGenerator([static::$surnamesHandle]), $callback);
    }
6853
public function saveTable($name, callable $callback, $ifNotExists = true, $options = [])
    {
        $options = $this->prepareBCOptions($options);

        return $this->getTable($name)->save($callback, $ifNotExists, $options);
    }
125439
public function each(Closure $callback) 
	{
		foreach( $this->attributes as $key => $value ) 
		{
			if( $callback($value, $key) === false ) {
				break;
			}
		}

		return $this;
	}
143375
protected function buildBasic($name, Closure $callback = null)
    {
        if ($name instanceof Closure) {
            $callback = $name;
            $name     = null;
        }
        //!empty($name) && $this->legend($name);

        call_user_func($callback, $this);
    }
389088
public static function make(Closure $callback = null)
    {
        if ($callback instanceof Closure) {
            return $callback(new static(Security::create()));
        }

        return new static(Security::create());
    }
758720
public function rightJoin($table, Closure $closure)
    {
        $this->sql->addJoinClause('RIGHT', $table, $closure);
        return $this;
    }
601294
public static function make($properties, Closure $callback = null)
    {
        $item = new self($properties);

        if (is_callable($callback)) {
            call_user_func($callback, $item);
        }

        return $item;
    }
1250096
protected function prepareDestination(Closure $callback)
    {
        return function ($passable) use ($callback)
        {
            try {
                return call_user_func($callback, $passable);
            }
            catch (Exception $e) {
                return $this->handleException($passable, $e);
            }
            catch (Throwable $e) {
                return $this->handleException($passable, new FatalThrowableError($e));
            }
        };
    }
186925
public function listen($event, \Closure $callback): void
    {
        // check if $event is a single string and set it as array with one item
        if (!Any::isArray($event)) {
            $event = [$event];
        }
        
        // each every one event in array
        foreach ($event as $item) {
            if (Any::isArray($this->runned) && array_key_exists($item, $this->runned)) {
                call_user_func_array($callback, $this->runned[$item]);
            }
        }
    }
203437
public function pretend( Closure $callback )
	{
		$loggingQueries = $this->loggingQueries;

		$this->enableQueryLog();

		$this->pretending = true;

		$this->queryLog = [];

		// Basically to make the database connection "pretend", we will just return
		// the default values for all the query methods, then we will return an
		// array of queries that were "executed" within the Closure callback.
		$callback( $this );

		$this->pretending = false;

		$this->loggingQueries = $loggingQueries;

		return $this->queryLog;
	}
479943
public static function create($table, $callback)
	{
		$table = new Table($table);

		// To indicate that the table is new and needs to be created, we'll run
		// the "create" command on the table instance. This tells schema it is
		// not simply a column modification operation.
		$table->create();

		call_user_func($callback, $table);

		return static::execute($table);
	}
788027
public function push($element, Closure $callback = null): self
    {
        $element = $this->createElement($element);

        if ($callback) {
            $callback($element);
        }

        parent::push($element);

        return $this;
    }
762522
public function register($name, Closure $callback)
    {
        $this->checkCallbackName($name);

        $this->callbacks[$name] = $callback;

        return $this;
    }
1151273
public static function create(Closure $callback = null)
    {
        if (self::$instance === null) {
            self::$instance = new self();
        }

        if ($callback instanceof Closure) {
            return $callback(self::$instance);
        }

        return self::$instance;
    }
518146
public function mapSurname(Closure $callback)
    {
        if (empty($this->surnames)) {
            $surnames = $this->path.'/surnames';

            if (file_exists($surnames)) {
                $this->surnames = (array) include $surnames;
            }
        }

        $callback($this->surnames);
    }
1094999
function(name, schema, callback){
    var self = this;
    this.db.serialize(function() {
      self.db.run("CREATE TABLE IF NOT EXISTS\"" + name + "\" " + schema, callback);
    });
  }