returns default FQDB
@return \Readdle\Database\FQDB
517774
public static function defaultFQDB() {
        if (self::$defaultFQDB)
            return self::$defaultFQDB;

        if (is_callable(self::$FQDBCreatorCallback))
            return self::setDefaultFQDB(call_user_func(self::$FQDBCreatorCallback));
    }
435684
public function getColumnQuery() {
        // prepare column types
        $type_val = $this->getTypeVal();
        // build query
        $query = $this->db->quotekey($this->name).' '.$type_val.' '.
            $this->getNullable();
        // unify default for booleans
        if (preg_match('/bool/i', $type_val) && $this->default!==null)
            $this->default = (int) $this->default;
        // default value
        if ($this->default !== false) {
            $def_cmds = array(
                'sqlite2?|mysql|pgsql' => 'DEFAULT',
                'mssql|sybase|dblib|odbc|sqlsrv' => 'constraint DF_'.$this->table->name.'_'.$this->name.' DEFAULT',
                'ibm' => 'WITH DEFAULT',
            );
            $def_cmd = $this->findQuery($def_cmds).' '.$this->getDefault();
            $query .= ' '.$def_cmd;
        }
        if (!empty($this->after) && $this->table instanceof TableModifier) {
            // `after` feature only works for mysql
            if (preg_match('/mysql/', $this->db->driver())) {
                $after_cmd = 'AFTER '.$this->db->quotekey($this->after);
                $query .= ' '.$after_cmd;
            }
        }
        return $query;
    }
289791
public function getDefaultChannel()
    {
        if (!isset($this->getConnectionMap()[$this->defaultConnectionName])) {
            throw new DefaultConnectionNotFoundException(
                'Default queue connection not found, You can fix this by adding RabbitMqEnv::RABBITMQ_DEFAULT_CONNECTION = true in your queue connection in config_* files'
            );
        }

        return $this->getConnectionMap()[$this->defaultConnectionName]->getChannel();
    }
693689
public static function _getDefaultACL()
    {
        if (self::$defaultACLUsesCurrentUser && self::$defaultACL)
        {
            $last = self::$lastCurrentUser ? clone self::$lastCurrentUser : null;
            if (!AVUser::getCurrentUser())
            {
                return self::$defaultACL;
            }
            if ($last != AVUser::getCurrentUser())
            {
                self::$defaultACLWithCurrentUser = clone self::$defaultAC;
                self::$defaultACLWithCurrentUser->_setShared(true);
                self::$defaultACLWithCurrentUser->setUserReadAccess(AVUser::getCurrentUser(), true);
                self::$defaultACLWithCurrentUser->setUserWriteAccess(AVUser::getCurrentUser(), true);
                self::$lastCurrentUser = clone AVUser::getCurrentUser();
            }

            return self::$defaultACLWithCurrentUser;
        }

        return self::$defaultACL;
    }
81430
public function getIban() : ?string 
    {
        if ( ! $this->hasIban()) {
            $this->setIban($this->getDefaultIban());
        }
        return $this->iban;
    }
653070
public function getDbValue()
    {
        $value = $this->getValue();
        if (is_null($value)) {
            // Process default value
            $value = $this->getDefaultValue();
            if ($this->isInstanceOf($value, AbstractEntity::class)) {
                if (!$value->exists()) {
                    $value->save();
                }

                $value = $value->id;
            }

            return $this->processToDbValue($value);
        }

        // Save if new or if updating is allowed
        if (!$value->exists() || $this->getUpdateExisting()) {
            $value->save();
        }

        return $this->processToDbValue($value->id);
    }
409561
public function getDefaultConnectionString()
	{
		return array_key_exists($this->_defaultConnection, $this->_connections) ?
			$this->_connections[$this->_defaultConnection] : null;
	}
386538
public function getSql()
    {
        if ($this->sql !== null && $this->state === self::STATE_CLEAN) {
            return $this->sql;
        }

        switch ($this->type) {
            case self::DELETE:
                $this->sql = $this->getSqlForDelete();
                break;

            case self::UPDATE:
                $this->sql = $this->getSqlForUpdate();
                break;

            case self::SELECT:
            default:
                $this->sql = $this->getSqlForSelect();
                break;
        }

        $this->state = self::STATE_CLEAN;

        return $this->sql;
    }
944325
public function getSQL()
    {
        if ($this->sql !== null && $this->state === self::STATE_CLEAN) {
            return $this->sql;
        }

        switch ($this->type) {
            case self::INSERT:
                $sql = $this->getSQLForInsert();
                break;
            case self::DELETE:
                $sql = $this->getSQLForDelete();
                break;

            case self::UPDATE:
                $sql = $this->getSQLForUpdate();
                break;

            case self::SELECT:
            default:
                $sql = $this->getSQLForSelect();
                break;
        }

        $this->state = self::STATE_CLEAN;
        $this->sql   = $sql;

        return $sql;
    }
870056
public DBService getDefaultDB() {
        String defaultTenantName = TenantService.instance().getDefaultTenantName();
        synchronized (m_tenantDBMap) {
            DBService dbservice = m_tenantDBMap.get(defaultTenantName);
            assert dbservice != null : "Database for default tenant not found";
            return dbservice;
        }
    }
148662
protected function getDefault()
    {
        $current_url = $this->url->get();

        return array(
            'id' => uniqid(),
            'status' => true,
            'title' => '',
            'url' => '',
            'total' => 0,
            'errors' => 0,
            'done' => 0,
            'inserted' => 0,
            'updated' => 0,
            'context' => array(
                'offset' => 0,
                'line' => 1,
            ),
            'data' => array(),
            'message' => array(
                'start' => $this->translation->text('Starting...'),
                'finish' => $this->translation->text('Finished'),
                'process' => $this->translation->text('Processing...')
            ),
            'redirect' => array(
                'finish' => $current_url,
                'errors' => $current_url,
                'no_results' => $current_url
            ),
            'redirect_message' => array(
                'finish' => '',
                'errors' => '',
                'no_results' => ''
            ),
            'log' => array(
                'errors' => ''
            )
        );
    }
469070
public function getDb(): ?ConnectionInterface
    {
        if (!$this->hasDb()) {
            $this->setDb($this->getDefaultDb());
        }
        return $this->db;
    }
264027
public function getDefaultQueue(): ?Queue
    {
        // By default, the Queue Facade does not return the
        // any actual database connection, but rather an
        // instance of \Illuminate\Queue\QueueManager.
        // Therefore, we make sure only to obtain its
        // "connection", to make sure that its only the connection
        // instance that we obtain.
        $manager = QueueFacade::getFacadeRoot();
        if (isset($manager)) {
            return $manager->connection();
        }
        return $manager;
    }
157135
public function getDb()
    {
        if (!$this->db) {
            $this->db = $this->source;

            if (!$this->db instanceof AbstractDatabaseDriver) {
                $this->db = Ioc::getDatabase();
            }
        }

        return $this->db;
    }
651897
public function getDatabase()
    {
        if ($this->_oDatabaseObject === null) {
            $this->_oDatabaseObject = oxDb::getDb(oxDb::FETCH_MODE_ASSOC);
        }

        return $this->_oDatabaseObject;
    }
1176185
public function &getDbMaster ()
	{
		
		// Get the default master
		
		$obj	=& $this->getResource ('db-master');
		
		// Failing that try to get a random master
		
		if (!$obj)
		{
			
			$obj	=& self::_getRandomDbResource ('db-master');
			
			// Default to database resource if no valid master
		
			if (!$obj)
			{
				$obj =& $this->getResource ('db');
			}
			
			// Set object master to use in the future

			$this->setResourceObj ('db-master', $obj);
			
		}
		
		// Return database connection
		
		return $obj;
		
	}
619093
public static function getDefaultDB()
    {
        if (self::$defaultDBName === null) {
            // Determine default database name.
            self::$defaultDBName = isset(self::$configuration['datasources']['default']) && is_scalar(self::$configuration['datasources']['default']) ? self::$configuration['datasources']['default'] : self::DEFAULT_NAME;
        }

        return self::$defaultDBName;
    }