Skip to content

updated README #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2025
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
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Ignore build output
/dist/

# Ignore SQLite amalgamation sources
/src/sqlite3.c
/src/sqlite3.h
/src/sqlite3ext.h
/src/shell.c

*.log

# Prerequisites
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ make compile-macos # For macOS
After compilation, you can load the extensions in your SQLite shell using:

```sql
.load '/path/to/dist/json_equal'
.load '/path/to/dist/regexp'
.load '/path/to/dist/split_part'
.load '/path/to/dist/aws_policy_equal'
.load 'dist/json_equal'
.load 'dist/regexp'
.load 'dist/split_part'
.load 'dist/aws_policy_equal'
```

Alternatively, you can download the extensions from [__sqlpkg__](https://sqlpkg.org/?q=stackql%2Fjson_equal).
Expand All @@ -99,6 +99,12 @@ SELECT aws_policy_equal(
'{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["s3:PutObject","s3:GetObject"],"Resource":"*"}]}'
); -- Returns 1 (true)

-- Compare AWS policies which are different
SELECT aws_policy_equal(
'{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["s3:GetObject","s3:PutObject"],"Resource":"*"}]}',
'{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":["s3:PutObject","s3:GetObject"],"Resource":"*"}]}'
); -- Returns 0 (false)

-- Compare trust policies with different Principal formats
SELECT aws_policy_equal(
'{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:role/role1"},"Action":"sts:AssumeRole"}]}',
Expand Down
Loading