{"id":41396086,"url":"https://github.com/sqlite3ent/sqlite3","last_synced_at":"2026-04-07T06:02:14.254Z","repository":{"id":142544397,"uuid":"613234775","full_name":"sqlite3ent/sqlite3","owner":"sqlite3ent","description":"The go sqlite3 support for ent without cgo","archived":false,"fork":false,"pushed_at":"2026-03-23T08:59:08.000Z","size":262,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-24T05:52:13.492Z","etag":null,"topics":["ent","nocgo","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sqlite3ent.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-13T07:10:22.000Z","updated_at":"2026-03-23T08:49:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"cda7690c-c9ac-401b-8382-7ae81f8ef871","html_url":"https://github.com/sqlite3ent/sqlite3","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/sqlite3ent/sqlite3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite3ent%2Fsqlite3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite3ent%2Fsqlite3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite3ent%2Fsqlite3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite3ent%2Fsqlite3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sqlite3ent","download_url":"https://codeload.github.com/sqlite3ent/sqlite3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sqlite3ent%2Fsqlite3/sbom","scorecard":{"id":843020,"data":{"date":"2025-08-11","repo":{"name":"github.com/sqlite3ent/sqlite3","commit":"88b7b506c01a3a3260f555ce98b76edff65e09c8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/11 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":"Maintained","score":5,"reason":"7 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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: BSD 3-Clause \"New\" or \"Revised\" 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"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T20:52:49.846Z","repository_id":142544397,"created_at":"2025-08-23T20:52:49.846Z","updated_at":"2025-08-23T20:52:49.846Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["ent","nocgo","sqlite3"],"created_at":"2026-01-23T12:56:56.569Z","updated_at":"2026-04-07T06:02:14.233Z","avatar_url":"https://github.com/sqlite3ent.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlite3\n\n## About this package\n\nThis package serves as a **database driver adapter** for Go's `ent` entity framework, enabling it to seamlessly utilize the **`modernc.org/sqlite`** driver as its SQLite backend.\n\n### The Problem\n\n1.  The `ent` framework typically recommends `mattn/go-sqlite3` as its SQLite driver.\n2.  `mattn/go-sqlite3` is an excellent driver but relies on **CGO**.\n3.  CGO can complicate the Go project's compilation process, especially for **cross-platform compilation**, leading to additional environment setup and dependency issues.\n\n### The Solution\n\n1.  `modernc.org/sqlite` is a **pure Go implementation** of the SQLite driver, completely eliminating CGO dependencies and resolving the aforementioned compilation challenges.\n2.  However, `ent` requires a driver that can correctly parse specific Data Source Name (DSN) parameters (e.g., `_fk=1` for foreign key constraints) during code generation and database connection.\n3.  **This package (`github.com/sqlite3ent/sqlite3`) acts as the crucial \"bridge\"**. It registers a driver named `sqlite3` that internally uses `modernc.org/sqlite`. Crucially, it understands `ent`-specific DSN parameters, ensuring `ent` functions correctly and without issues.\n\n### Core Advantages\n\n*   **CGO-Free**: Simplifies your project by removing CGO dependencies.\n*   **Effortless Cross-Platform Compilation**: Compile your application for any Go-supported platform without complex configurations.\n*   **Seamless `ent` Integration**: From `ent`'s perspective, it operates as if using a standard SQLite driver.\n\n## Version\n\nCurrent version: v1.41.0 (This will be updated automatically upon new releases)\n\n## Installation\n\n```bash\ngo get github.com/sqlite3ent/sqlite3@latest\n```\n\n## How to use\n\nUsing this package in your `ent` project is straightforward, involving two main steps:\n\n### 1. Configure the Driver in `ent` Code Generation\n\nYou need to instruct `ent` to use this package as the driver within your project's `ent/generate.go` file.\n\n```go\n//go:build ignore\n\npackage main\n\nimport (\n\t\"log\"\n\n\t\"entgo.io/ent/dialect\"\n\t\"entgo.io/ent/entc\"\n\t\"entgo.io/ent/entc/gen\"\n)\n\nfunc main() {\n\terr := entc.Generate(\"./schema\", \u0026gen.Config{\n\t\t// Tell ent we are using an external SQL driver\n\t\tFeatures: []gen.Feature{\n\t\t\tgen.FeatureUpsert,\n\t\t\tgen.FeatureSQLDriver,\n\t\t},\n\t\t// Configure SQLite dialect\n\t\tDialect: dialect.SQLite,\n\t\t// Specify the driver's import path\n\t\tDriver: \"github.com/sqlite3ent/sqlite3\",\n\t})\n\tif err != nil {\n\t\tlog.Fatalf(\"running ent codegen: %v\", err)\n\t}\n}\n```\n\nAfter configuration, run `go generate ./...` to regenerate your `ent` code.\n\n### 2. Connect to the Database in Your Application\n\nIn your `main.go` or other application entry file, anonymously import this driver, then use `ent.Open` as usual.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"your/project/ent\" // Replace with your project's ent path\n\n\t// Crucial step: Anonymous import of this driver.\n\t// This executes the driver's init() function,\n\t// registering it with Go's database/sql system.\n\t_ \"github.com/sqlite3ent/sqlite3\"\n)\n\nfunc main() {\n\t// DSN (Data Source Name) format is compatible with mattn/go-sqlite3.\n\t// Example: using an in-memory database with foreign keys enabled.\n\tdsn := \"file:ent?mode=memory\u0026cache=shared\u0026_fk=1\"\n\n\t// Use ent.Open to connect to the database.\n\t// ent will automatically use our registered \"sqlite3\" driver.\n\tclient, err := ent.Open(dialect.SQLite, dsn)\n\tif err != nil {\n\t\tlog.Fatalf(\"failed opening connection to sqlite: %v\", err)\n\t}\n\tdefer client.Close()\n\n\t// Run database migrations (e.g., create tables)\n\tif err := client.Schema.Create(context.Background()); err != nil {\n\t\tlog.Fatalf(\"failed creating schema resources: %v\", err)\n\t}\n\n\t// ... Your application logic goes here ...\n\tlog.Println(\"Successfully connected to SQLite without CGO!\")\n}\n```\n\n## LICENSE\n\nUsed BSD-3-Clause is same as `modernc.org/sqlite`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlite3ent%2Fsqlite3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsqlite3ent%2Fsqlite3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsqlite3ent%2Fsqlite3/lists"}