src/Versioned.php
protected function augmentSQLVersionedVersion(SQLSelect $query, DataQuery $dataQuery)
    {
        $version = $dataQuery->getQueryParam('Versioned.version');
        if (!$version) {
            throw new InvalidArgumentException("Invalid version");
        }

        // Query against _Versions table first
        $this->augmentSQLVersioned($query);

        // Add filter on version field
        $baseTable = $this->baseTable();
        $query->addWhere([
            "\"{$baseTable}_Versions\".\"Version\"" => $version,
        ]);
    }
protected function augmentSQLVersionedVersion(SQLSelect $query, DataQuery $dataQuery)
    {
        $version = $dataQuery->getQueryParam('Versioned.version');
        if (!$version) {
            throw new InvalidArgumentException("Invalid version");
        }

        // Query against _Versions table first
        $this->augmentSQLVersioned($query);

        // Add filter on version field
        $baseTable = $this->baseTable();
        $query->addWhere([
            "\"{$baseTable}_Versions\".\"Version\"" => $version,
        ]);
    }
protected function augmentSQLVersionedVersion ( SQLSelect $ query , DataQuery $ dataQuery ) { $ version = $ dataQuery -> getQueryParam ( 'Versioned.version' ) ; if ( ! $ version ) { throw new InvalidArgumentException ( "Invalid version" ) ; } // Query against _Versions table first $ this -> augmentSQLVersioned ( $ query ) ; // Add filter on version field $ baseTable = $ this -> baseTable ( ) ; $ query -> addWhere ( [ "\"{$baseTable}_Versions\".\"Version\"" => $ version , ] ) ; }
If selecting a specific version, filter it here

@param SQLSelect $query
@param DataQuery $dataQuery
If selecting a specific version filter it here