-
Notifications
You must be signed in to change notification settings - Fork 873
Open
Description
View
export const foo = db.view(
{ name: 'foo', public: true },
t.array(t.row('fooReturns', { foo: t.bool() })),
ctx => {
return [
{
foo: true,
},
];
},
);Output via React useTable
Actual
{"foo":1}
Expected
{"foo":true}
Output via SQL Endpoint
[
{
"schema": {
"elements": [
{
"name": {
"some": "foo"
},
"algebraic_type": {
"Bool": []
}
}
]
},
"rows": [
[
true
]
],
"total_duration_micros": 2927,
"stats": {
"rows_inserted": 0,
"rows_deleted": 0,
"rows_updated": 0
}
}
]Weirdly this half works
export const foo = db.view(
{ name: 'foo', public: true },
t.array(t.row('fooReturns', { foo: t.bool(), sub: t.object('foo', { subFoo: t.bool() }) })),
ctx => {
return [
{
foo: true,
sub: {
subFoo: true,
},
},
];
},
);OUTPUT
{"foo":true,"sub":{"subFoo":1}}Now the top level value is correctly a bool, but the sub value is a number
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels