nulib-base/php/tests/db/sqlite/impl/MyIndexChannel.php

30 lines
641 B
PHP

<?php
namespace nulib\db\sqlite\impl;
use nulib\cl;
use nulib\db\CapacitorChannel;
class MyIndexChannel extends CapacitorChannel {
const NAME = "my_index";
const TABLE_NAME = "my_index";
const COLUMN_DEFINITIONS = [
"name" => "varchar not null primary key",
"first" => "varchar",
"second" => "varchar",
];
const MIGRATION = [
"index" => [
"create index my_index_first on my_index(first)",
"create index my_index_second on my_index(second)",
],
];
function getItemValues($item): ?array {
return cl::select($item, [
"name" => 0,
"first" => 1,
"second" => 2,
]);
}
}