{"id":16347098,"url":"https://github.com/anexen/sqc","last_synced_at":"2026-04-05T22:31:19.265Z","repository":{"id":144098371,"uuid":"419652835","full_name":"Anexen/sqc","owner":"Anexen","description":"SQL queries for collections","archived":false,"fork":false,"pushed_at":"2024-07-16T19:03:50.000Z","size":1782,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-19T06:10:08.282Z","etag":null,"topics":["linq-to-objects","python","query-engine"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anexen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-21T09:04:26.000Z","updated_at":"2024-06-17T12:51:20.000Z","dependencies_parsed_at":"2024-06-05T20:34:00.058Z","dependency_job_id":"9a499ecc-ce81-4560-99e3-cb56b7813fd5","html_url":"https://github.com/Anexen/sqc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Anexen/sqc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anexen%2Fsqc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anexen%2Fsqc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anexen%2Fsqc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anexen%2Fsqc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anexen","download_url":"https://codeload.github.com/Anexen/sqc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anexen%2Fsqc/sbom","scorecard":{"id":14036,"data":{"date":"2025-08-11","repo":{"name":"github.com/Anexen/sqc","commit":"2f47a9a6c0b2133d1f667f495a5fb20851606367"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/Anexen/sqc/test.yml/main?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-14T15:18:49.505Z","repository_id":144098371,"created_at":"2025-08-14T15:18:49.505Z","updated_at":"2025-08-14T15:18:49.505Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31452899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linq-to-objects","python","query-engine"],"created_at":"2024-10-11T00:39:39.464Z","updated_at":"2026-04-05T22:31:18.137Z","avatar_url":"https://github.com/Anexen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQC\n\nSQL Queries to Collections\n\n# Example\n\n```python\nad_data = [\n    {\"date\": \"2023-01-01\", \"campaign_id\": 11, \"spend\": 100, \"clicks\": 1000},\n    {\"date\": \"2023-01-02\", \"campaign_id\": 11, \"spend\": 200, \"clicks\": 1500},\n    {\"date\": \"2023-01-02\", \"campaign_id\": 22, \"spend\": 150, \"clicks\": 1100},\n    {\"date\": \"2023-01-03\", \"campaign_id\": 22, \"spend\": 50, \"clicks\": 750},\n    {\"date\": \"2023-01-04\", \"campaign_id\": 22, \"spend\": 300, \"clicks\": 1050},\n]\n\ncampaign_data = [\n    {\"id\": 11, \"name\": \"First Campaign\"},\n    {\"id\": 22, \"name\": \"Second Campaign\"},\n]\n\n\nquery = \"\"\"\nSELECT\n    ad_data.campaign_id AS `Campaign ID`,\n    campaign_data.name AS `Campaign Name`,\n    SUM(spend) AS `Spend, $`,\n    SUM(clicks) AS `Clicks`\nFROM ad_data\nJOIN campaign_data\n    ON ad_data.campaign_id = campaign_data.id\nWHERE spend \u003e= 100\nGROUP BY\n    ad_data.campaign_id,\n    campaign_data.name\n\"\"\"\n\nimport sqc\n\nresult = sqc.query(query, {\n    \"ad_data\": ad_data,\n    \"campaign_data\": campaign_data,\n})\n\nassert result == [\n    {'Campaign ID': 11, 'Campaign Name': 'First Campaign', 'Spend, $': 300, 'Clicks': 2500},\n    {'Campaign ID': 22, 'Campaign Name': 'Second Campaign', 'Spend, $': 450, 'Clicks': 2150},\n]\n```\n\n# Supported features\n\n[] `SELECT`\n    - [x] Wildcard, e.g. `SELECT *`\n    - [x] Aliases, e.g. `SELECT column AS new_name`\n    - [x] Escaping, e.g. `SELECT \"Column name with whitespace\"`\n    - [] `DISTINCT`\n[] `WHERE`\n    - [x] Comparison (=, \u003c, \u003e, \u003c=, \u003e=, !=)\n    - [x] Arithmetic (+, -, *, /, %)\n    - [x] `AND`\n    - [x] `OR`\n    - [x] `NOT`\n    - [] `LIKE`\n    - [] `IS NULL`\n    - [] `IN`\n[] `CASE .. WHEN`\n[] `ORDER BY`\n[] `LIMIT`\n[] `OFFSET`\n[] `INNER JOIN`\n[] `LEFT JOIN`\n[] `RIGHT JOIN`\n[] `CROSS JOIN`\n[] `GROUP BY`\n[] `HAVING`\n[] `CTE`\n[] `UNION`\n[] Combining Queries\n    - [] `UNION [ALL]`\n    - [] `INTERSECT [ALL]`\n    - [] `EXCEPT [ALL]`\n[] Subqueries\n[] Aggregate Functions:\n    [x] `COUNT`\n    [x] `SUM`\n    [] `AVG`\n    [] `MIN`\n    [] `MAX`\n    [] `MEAN`\n    [] `WEIGHTED_AVG`\n    [] ...\n[] Window functions:\n    [] `ROW_NUMBER`\n    [] `RANK`\n    [] ...\n[] Query Parameters, e.g. `SELECT * FROM table WHERE date \u003e $1`\n[] Nested data source\n[] Prepared queries\n[] UDF\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanexen%2Fsqc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanexen%2Fsqc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanexen%2Fsqc/lists"}