Yajra\Oci8\Schema\Sequence::create PHP Method

create() public method

function to create oracle sequence
public create ( string $name, integer $start = 1, boolean $nocache = false ) : boolean
$name string
$start integer
$nocache boolean
return boolean
    public function create($name, $start = 1, $nocache = false)
    {
        if (!$name) {
            return false;
        }
        $nocache = $nocache ? 'nocache' : '';
        return $this->connection->statement("create sequence {$name} start with {$start} {$nocache}");
    }

Usage Example

Beispiel #1
0
 /** @test */
 public function it_will_create_sequence()
 {
     $connection = $this->getConnection();
     $sequence = new Sequence($connection);
     $connection->shouldReceive('statement')->andReturn(true);
     $success = $sequence->create('users_id_seq');
     $this->assertEquals(true, $success);
 }
All Usage Examples Of Yajra\Oci8\Schema\Sequence::create