Return the database store for this model.
@return ContentItemStore
768548
public static function load() : ContentItemStore
    {
        if (is_null(self::$instance)) {
            self::$instance = new ContentItemStore(Connection::get());
        }

        return self::$instance;
    }
916392
protected function db(): Database
    {
        $conn = app(Pool::class)->getConnection();
        $database = $conn->defaultDatabase;

        return $conn->getRawConnection()->$database;
    }
1192409
public static function load() : JobStore
    {
        if (is_null(self::$instance)) {
            self::$instance = new JobStore(Connection::get());
        }

        return self::$instance;
    }
1095688
public static function getDb() {
        // Get the image manager object
        $oImageManager = Yii::$app->get('imagemanager', false);

        if($oImageManager === null) {
            // The image manager object has not been set
            // The normal DB object will be returned, error will be thrown if not found
            return Yii::$app->get('db');
        }

        // The image manager component has been loaded, the DB component that has been entered will be loaded
        // By default this is the Yii::$app->db connection, the user can specify any other connection if needed
        return Yii::$app->get($oImageManager->databaseComponent);
    }
1316239
private function getStore($store)
    {
        if (!is_object($store)) {
            $store = $this->storeManager->getStore($store);
        }

        return $store;
    }
1249410
protected function loadDatabase()
    {
        $this->hook->trigger(self::HOOK_INIT_DATABASE_BEFORE);

        $database = \Parable\DI\Container::get(\Parable\ORM\Database::class);
        $database->setConfig($this->config->get('parable.database'));

        $this->hook->trigger(self::HOOK_INIT_DATABASE_AFTER);
        return $this;
    }
242155
public function store()
    {
        try {
            $this->service->store(Input::get());

            return $this->response()->created();
        } catch (ValidationException $e) {
            throw new StoreResourceFailedException('Store failed', $e->getValidationErrors());
        } catch (DomainException $e) {
            throw new StoreResourceFailedException('Store failed', [$e->getMessage()]);
        } catch (MassAssignmentException $e) {
            throw new StoreResourceFailedException('Store failed : Invalid model Configuration ($fillable)', [$e->getMessage()]);
        }
    }
1065005
public static function load() : SettingStore
    {
        if (is_null(self::$instance)) {
            self::$instance = new SettingStore(Connection::get());
        }

        return self::$instance;
    }
447537
public function targetStore() {
		if ($this->owner->ParentID) {
			$store = $this->owner->Parent()->getCDNStore();
			return $store;
		}

		return $this->contentService->getDefaultStore();
	}
548684
public static function getDatabase()
	{
		//get the database settings from global space
        global $database;

        //create instance of database class
        $instance = new BaseDb($database['default'], $database[$database['default']]);

        //get connection instance and make attempt to connect to the database
        $instance = $instance->initialize()->connect();

		return $instance; 

	}
1042391
public function apiStore()
    {
        DB::beginTransaction();

        try {
            $record = $this->__apiStore();
        } catch (\Exception $e) {
            DB::rollback();

            return HCLog::error('CORE-0002' . $e->getCode(), $e->getMessage());
        }

        DB::commit();

        return response($record);
    }
344900
public function GetListOfTablesInDatabase() {
        $dbConfig = new \Puzzlout\Framework\Dal\DbStatementConfig(null, \Puzzlout\Framework\Dal\DbExecutionType::SHOWTABLES, new \Puzzlout\Framework\Dal\DbQueryFilters());
        $dbConfig->setQuery("SHOW TABLES;");
        $this->addDbConfigItem($dbConfig);
        return $this->BindParametersAndExecute();
    }
697234
public function getStore()
    {
        if (null != $this->store) {
            return $this->store;
        }

        switch($this->config['driver']) {
            case "memcached":
                $this->store   = $this->createMemcachedStore();
                break;
            case "redis":
                $this->store   = $this->createRedisStore();
                break;
            default:
                throw new CacheException("store [{$this->config['driver']}] not supported.");
        }

        return $this->store;
    }
983247
public function getContentLibrary()
    {
        return $this->contentLibrary == null?
            $this->contentLibrary = new SiteContentLibraryImpl($this->container):
            $this->contentLibrary;
    }
227216
public function getStoresForFrontend()
    {
        $collection = $this->stockistsCollectionFactory->create()
            ->addFieldToSelect('*')
            ->addFieldToFilter('store_id', $this->getStoreId())
            ->addFieldToFilter('status', Stores::STATUS_ENABLED)
            ->setOrder('name', 'ASC');
        return $collection;
    }
651897
public function getDatabase()
    {
        if ($this->_oDatabaseObject === null) {
            $this->_oDatabaseObject = oxDb::getDb(oxDb::FETCH_MODE_ASSOC);
        }

        return $this->_oDatabaseObject;
    }
980875
public function getStoreFields()
    {
        $schemaManager = $this->connection->getDriver()->getSchemaManager($this->connection);
        $columns       = array();
        $sql           = $schemaManager->getDatabasePlatform()->getListTableColumnsSQL($this->tableName, $this->connection->getDatabase());
        $all           = $this->connection->fetchAll($sql);

        foreach ($all as $fieldInfo) {
            $columns[] = $fieldInfo["name"];
        }
        return $columns;
    }