Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 148 additions & 69 deletions .vscode/launch.json

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,46 @@ stackql \

```

### Joins

Only inner joins suported for now.


Self join:
```sql
select d1.name as n, d1.id, d2.id as d2_id from google.compute.disks d1 inner join google.compute.disks d2 on d1.id = d2.id where d1.project = 'testing-project' and d1.zone = 'australia-southeast1-b' and d2.project = 'testing-project' and d2.zone = 'australia-southeast1-b';
```

Three way join:
```sql
select
d1.name as n,
d1.id,
n1.description,
s1.description as s1_description
from
google.compute.disks d1
inner join google.compute.networks n1
on
d1.name = n1.name
inner join
google.compute.subnetworks s1
on
d1.name = s1.name
where
d1.project = 'testing-project' and
d1.zone = 'australia-southeast1-b' and
n1.project = 'testing-project'
and s1.project = 'testing-project'
and s1.region = 'australia-southeast1'
;
```

Cross-provider join:
```sql
select d1.name, d1.id, d2.name as d2_name, d2.status, d2.label, d2.id as d2_id from google.compute.disks d1 inner join okta.application.apps d2 on d1.name = d2.label where d1.project = 'testing-project' and d1.zone = 'australia-southeast1-b' and d2.subdomain = 'my-subdomain' order by d1.name;
```

### SHOW SERVICES

```
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.10.1
github.com/stackql/go-openapistackql v0.0.6-beta24
github.com/stackql/go-openapistackql v0.0.6-rc01
github.com/stackql/go-sqlite3 v0.0.1-stackqlrc01
github.com/stackql/go-suffix-map v0.0.1-alpha01
go.uber.org/zap v1.21.0
Expand Down Expand Up @@ -76,6 +76,6 @@ replace readline => github.com/stackql/readline v0.0.1-rc01

replace github.com/fatih/color => github.com/stackql/color v0.0.1-rc01

replace vitess.io/vitess => github.com/stackql/vitess v0.0.11-alpha05
replace vitess.io/vitess => github.com/stackql/vitess v0.0.11-alpha07

replace github.com/jeroenrinzema/psql-wire => github.com/stackql/psql-wire v0.0.1-stackqlrc01
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ github.com/stackql/color v0.0.1-rc01 h1:fq3Gj6gwskaZnQrDXfFYnDP6JyayGHy6Dp7I5P/V
github.com/stackql/color v0.0.1-rc01/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/stackql/go-openapistackql v0.0.6-beta24 h1:rpF9RTFXAulWBXHSx6UPQ4yCOePX1vGbWpZfCbuwas8=
github.com/stackql/go-openapistackql v0.0.6-beta24/go.mod h1:SdoMaYa3qsaE1nO/5BXcXqKyfOXAx1vxk4UpCDTpoKI=
github.com/stackql/go-openapistackql v0.0.6-rc01 h1:s5SS2gtzxxUYYO0+hmNQ8twC7v9kuRfWdXkGbUUfozM=
github.com/stackql/go-openapistackql v0.0.6-rc01/go.mod h1:SdoMaYa3qsaE1nO/5BXcXqKyfOXAx1vxk4UpCDTpoKI=
github.com/stackql/go-spew v1.1.3-alpha24 h1:yNmgWU+OKU8SvlQ0umiQWWgWS6C5U1GuRMlYfQgbmJA=
github.com/stackql/go-spew v1.1.3-alpha24/go.mod h1:o2MPqg2ee1PN4SxAh9zQSJJmKKFJjpro9pejdK7dXWk=
github.com/stackql/go-sqlite3 v0.0.1-stackqlrc01 h1:q+LfCfPrIqqG5+v9T5xjyYzOEBB4i77Ek10Lzwyd0D4=
Expand All @@ -652,6 +654,8 @@ github.com/stackql/stackql-provider-registry v0.0.1-rc01 h1:3XorfaYEhGpuvEeQK04E
github.com/stackql/stackql-provider-registry v0.0.1-rc01/go.mod h1:D0WFWa7HOXS+PQAmvN0Nm1E6dMdUkUFtAzRH8cXxg88=
github.com/stackql/vitess v0.0.11-alpha05 h1:h+FczKcSE6k0tm/O/UyaCzNjzlrHof2FcG1Gzpqq+68=
github.com/stackql/vitess v0.0.11-alpha05/go.mod h1:6aOZHbgHclTasEGZvrdoWfca6Y4XJfemKMqwnDL/klI=
github.com/stackql/vitess v0.0.11-alpha07 h1:YWTiJ9thQ0d4p24wkfobHOEsM7Z1NzsHkS8SdCq8NM0=
github.com/stackql/vitess v0.0.11-alpha07/go.mod h1:6aOZHbgHclTasEGZvrdoWfca6Y4XJfemKMqwnDL/klI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
Expand Down
Loading