// This code lives inside a route.tsx file running locally with:
// npm run pages:preview -- --d1 DB=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
// console.log(await env.DB.prepare(`pragma table_info(TABLE_NAME)`).all());
{
success: true,
meta: {
served_by: 'miniflare.db',
// ...
},
results: [
{
cid: 0,
name: 'id',
type: 'INT AUTO_INCREMENT',
notnull: 0,
dflt_value: null,
pk: 1
},
{
cid: 1,
name: 'url',
type: 'VARCHAR(2048)',
notnull: 1,
dflt_value: null,
pk: 0
},
// ...
// ...
// This code lives inside a route.tsx file running locally with:
// npm run pages:preview -- --d1 DB=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx
// console.log(await env.DB.prepare(`pragma table_info(TABLE_NAME)`).all());
{
success: true,
meta: {
served_by: 'miniflare.db',
// ...
},
results: [
{
cid: 0,
name: 'id',
type: 'INT AUTO_INCREMENT',
notnull: 0,
dflt_value: null,
pk: 1
},
{
cid: 1,
name: 'url',
type: 'VARCHAR(2048)',
notnull: 1,
dflt_value: null,
pk: 0
},
// ...
// ...