Platform
Solutions
Resources
Pricing
Sign in
Sign up
Mirek Rusin
Workspace
Fork
Public
By
Mirek Rusin
Edited
Oct 1
1 fork
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
render
(
Tsql
.
template
`
select *
from Users
where ${
Tsql
.
where
(
{
'fooJson->bar'
:
true
}
)
}
`
)
Insert cell
Insert cell
render
(
Tsql
.
template
`
select *
from Users
where ${
Tsql
.
where
(
{
myValue
:
{
$distinct
:
Tsql
.
id
(
'myDefaultsJson->$.myValueDefault'
)
}
}
)
}
`
)
Insert cell
Insert cell
render
(
Tsql
.
where
(
{
$or
:
[
{
state
:
{
$ne
:
'DONE'
}
,
createdAt
:
{
$gt
:
new
Date
(
Date
.
now
(
)
-
(
24
*
60
*
60
*
1000
)
)
}
}
,
{
state
:
{
$in
:
[
'PENDING'
,
'PROCESSING'
]
}
}
]
}
)
)
Insert cell
Insert cell
render
(
Tsql
.
where
(
{
'payloadJson->$.email'
:
{
$like
:
'%foo%'
}
}
)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
render
(
Tsql
.
insertIgnore
(
'Users'
,
[
'email'
]
,
[
{
email
:
'foo@local'
,
name
:
'Foo'
}
,
{
email
:
'bar@local'
,
name
:
'Bar'
}
,
{
email
:
'baz@local'
,
name
:
'Baz'
}
]
)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
render
(
Tsql
.
upsertObjects
(
'Users'
,
[
'email'
]
,
[
{
email
:
'foo@local'
,
name
:
'Foo'
}
,
{
email
:
'bar@local'
,
name
:
'Bar'
}
,
{
email
:
'baz@local'
,
name
:
'Baz'
}
]
)
)
Insert cell
Insert cell
render
(
Tsql
.
update
(
'Users'
,
{
id
:
{
$notIn
:
[
1
,
2
,
3
]
}
,
otherId
:
42
}
,
{
otherId
:
null
}
)
)
Insert cell
render
(
Tsql
.
update
(
'Users'
,
{
id
:
1
,
'payloadJson->processed'
:
true
}
,
{
status
:
'OK'
}
)
)
Insert cell
Insert cell
render
(
Tsql
.
updateObjects
(
'UserLimits'
,
[
'userId'
,
'symbol'
]
,
[
{
userId
:
1
,
symbol
:
'ETH'
,
long
:
1
,
short
:
2
}
,
{
userId
:
2
,
symbol
:
'BTC'
,
long
:
2
,
short
:
3
}
]
)
)
Insert cell
Insert cell
render
(
Tsql
.
merge1n
(
'UserCryptos'
,
[
'userId'
,
'symbol'
]
,
'usr:123'
,
[
'ETH'
,
'BTC'
]
)
)
Insert cell
Insert cell
render
(
Tsql
.
modifyJsons
(
'Users'
,
[
{
id
:
1
,
payloadJson
:
{
status
:
'OK'
}
}
,
{
id
:
2
,
payloadJson
:
{
status
:
'ERR'
}
}
]
)
)
Insert cell
Insert cell
render
(
Tsql
.
delete
(
'UserPermissions'
,
{
userId
:
{
$in
:
[
'A'
,
'B'
,
'C'
]
}
,
permissionId
:
{
$in
:
[
'CREATE'
,
'UPDATE'
,
'DELETE'
]
}
}
)
)
Insert cell
Insert cell
render
(
Tsql
.
orderBy
(
[
[
'foo bar'
,
'asc'
]
,
[
undefined
,
'asc'
]
,
// undefined identifier is ignored
undefined
,
// undefined is ignored
[
'baz'
,
'desc'
]
]
)
)
Insert cell
render
(
Tsql
.
in
(
'a'
,
null
)
)
Insert cell
render
(
Tsql
.
in
(
'a'
,
[
]
)
)
Insert cell
render
(
Tsql
.
in
(
'a'
,
[
null
]
)
)
Insert cell
Insert cell
Insert cell
Insert cell
One platform
to build and deploy the best data apps
Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
hints
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
render
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Tsql
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML