Skip to content
Fernando Correa de Oliveira edited this page Apr 6, 2019 · 1 revision
use Red;

model Bla {
   has Int $.bla is column
}

my $*RED-DB = database "SQLite";

Bla.^create-table: :if-not-exists;
Bla.^create: :bla($_) for ^20;

my $*RED-DEBUG = True;

.say for Bla.^all.batch(5)[1]
SQL : SELECT
   bla.bla 
FROM
   bla
LIMIT 5
OFFSET 5
BIND: []
Bla.new(bla => 5)
Bla.new(bla => 6)
Bla.new(bla => 7)
Bla.new(bla => 8)
Bla.new(bla => 9)
Clone this wiki locally