public function createGraph(NamedNode $graph, array $options = [])
    {
        if (false === isset($this->getGraphs()[$graph->getUri()])) {
            // table names
            $g2t = $this->configuration['table-prefix'].'_g2t';
            $id2val = $this->configuration['table-prefix'].'_id2val';

            /*
             * for id2val table
             */
            $query = 'INSERT INTO '.$id2val.' (val) VALUES("'.$graph->getUri().'")';
            $this->store->queryDB($query, $this->store->getDBCon());
            $usedId = $this->store->getDBCon()->insert_id;

            /*
             * for g2t table
             */
            $newIdg2t = 1 + $this->getRowCount($g2t);
            $query = 'INSERT INTO '.$g2t.' (t, g) VALUES('.$newIdg2t.', '.$usedId.')';
            $this->store->queryDB($query, $this->store->getDBCon());
            $usedId = $this->store->getDBCon()->insert_id;
        }
    }
public function createGraph(NamedNode $graph, array $options = [])
    {
        if (false === isset($this->getGraphs()[$graph->getUri()])) {
            // table names
            $g2t = $this->configuration['table-prefix'].'_g2t';
            $id2val = $this->configuration['table-prefix'].'_id2val';

            /*
             * for id2val table
             */
            $query = 'INSERT INTO '.$id2val.' (val) VALUES("'.$graph->getUri().'")';
            $this->store->queryDB($query, $this->store->getDBCon());
            $usedId = $this->store->getDBCon()->insert_id;

            /*
             * for g2t table
             */
            $newIdg2t = 1 + $this->getRowCount($g2t);
            $query = 'INSERT INTO '.$g2t.' (t, g) VALUES('.$newIdg2t.', '.$usedId.')';
            $this->store->queryDB($query, $this->store->getDBCon());
            $usedId = $this->store->getDBCon()->insert_id;
        }
    }
public function createGraph ( NamedNode $ graph , array $ options = [ ] ) { if ( false === isset ( $ this -> getGraphs ( ) [ $ graph -> getUri ( ) ] ) ) { // table names $ g2t = $ this -> configuration [ 'table-prefix' ] . '_g2t' ; $ id2val = $ this -> configuration [ 'table-prefix' ] . '_id2val' ; /*
             * for id2val table
             */ $ query = 'INSERT INTO ' . $ id2val . ' (val) VALUES("' . $ graph -> getUri ( ) . '")' ; $ this -> store -> queryDB ( $ query , $ this -> store -> getDBCon ( ) ) ; $ usedId = $ this -> store -> getDBCon ( ) -> insert_id ; /*
             * for g2t table
             */ $ newIdg2t = 1 + $ this -> getRowCount ( $ g2t ) ; $ query = 'INSERT INTO ' . $ g2t . ' (t, g) VALUES(' . $ newIdg2t . ', ' . $ usedId . ')' ; $ this -> store -> queryDB ( $ query , $ this -> store -> getDBCon ( ) ) ; $ usedId = $ this -> store -> getDBCon ( ) -> insert_id ; } }
Create a new graph with the URI given as NamedNode.

@param NamedNode $graph   instance of NamedNode containing the URI of the graph to create
@param array     $options optional It contains key-value pairs and should provide additional
introductions for the store and/or its adapter(s)

@throws \Exception if the given graph could not be created
Create a new graph with the URI given as NamedNode .