{"id":16210008,"url":"https://github.com/bian-sh/sqlite-test","last_synced_at":"2026-05-02T02:39:20.599Z","repository":{"id":171642354,"uuid":"648161962","full_name":"Bian-Sh/SQLite-Test","owner":"Bian-Sh","description":"SQLite - Net 的测试项目","archived":false,"fork":false,"pushed_at":"2023-06-24T17:09:16.000Z","size":1398,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T22:41:29.452Z","etag":null,"topics":["sql","sqlite3","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bian-Sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-06-01T10:48:06.000Z","updated_at":"2023-06-02T09:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c98e0e8-a50f-4c3b-8223-2d29f1ea8d29","html_url":"https://github.com/Bian-Sh/SQLite-Test","commit_stats":null,"previous_names":["bian-sh/sqlite-test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FSQLite-Test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FSQLite-Test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FSQLite-Test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bian-Sh%2FSQLite-Test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bian-Sh","download_url":"https://codeload.github.com/Bian-Sh/SQLite-Test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730064,"owners_count":20986404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["sql","sqlite3","unity3d"],"created_at":"2024-10-10T10:34:46.359Z","updated_at":"2026-05-02T02:39:20.546Z","avatar_url":"https://github.com/Bian-Sh.png","language":"C#","readme":"# SQLite-For-Unity\n\n这个项目是一个测试项目，用于测试 SQLite 在 Unity 中的使用。\n\nThis project is a test project for testing SQLite in Unity.\n\n\n# 开发环境 / Development environment\nUnity 2021.3.16f1\n\n# 测试简介 / Test introduction\n1. 测试 SQLite-net 在 Unity中的 ORM 增删改查的使用方式方法。\n\n\tTest the usage method of SQLite-net's ORM CRUD in Unity.\n\n2. 脚本 SQLHowTo.cs 用于在编辑器下测试，运行后点击此脚本上的 Inspector 面板上的按钮即可 ，提供对 Courses（课程）表的增删改查，如下图所示\n\n\tThe script SQLHowTo.cs is used for testing under the editor. After running, click the button on the Inspector panel of this script to provide CRUD for the Courses table, as shown in the figure below\n\n![](doc/sqlhowto.png)\n\n\n3. 工程同样配备了测试用例，位于 Assets/Scripts/UniTest/Runtime/SQLiteTests.cs, 通过菜单栏 Window/General/Test Runner 打开测试用例窗口，点击 Run All Tests 即可运行测试用例。\n\n\tThe project is also equipped with test cases, located in Assets/Scripts/UniTest/Runtime/SQLiteTests.cs, open the test case window through the menu bar Window/General/Test Runner, and click Run All to run the test case.\n\n![](doc/unitest.png)\n\n4. 新增 ``ForeignKeyAttribute`` 用例，这样一来 Query （查询）一个对象时就会自动创建关联的对象啦，至此用户再也不需要自己进行联合查询了\n\n\tAdd ``ForeignKeyAttribute`` test case, so that when Query an object, the associated object will be created automatically, so that users no longer need to perform joint queries\n\n\u003e 示例代码展示的是仅对 A 进行一次查询，但是 B 也能够自动生成实例 (One Query for All!)\n\n![One Query for All](doc/automapping.png)\n\n\n\n# 使用方法 / How to use\n\n* clone 本项目后，使用 对应版本的 Unity 开启即可。\n\n\tAfter cloning this project, use the corresponding version of Unity to open it.\n\n* AutoMapping（One Query for All） 测试，直接将场景中 ObjectAutoMapping 对象隐藏再显示即可触发。\n\n\tAutoMapping（One Query for All） test, just hide and show the ObjectAutoMapping object in the scene to\t trigger it.\n\n* 常规测试在场景中 Test 游戏对象上，点击运行后，在面板上点击对应的按钮即可。\n\n\tFor normal testing, click the Test game object in the scene, click the corresponding button on the panel after running.\n\n\n\n\n# 参考链接 / Reference\n\nSQLite client and ORM for .NET https://github.com/praeclarum/sqlite-net\n\n加密版本的 sqlite https://github.com/sqlcipher/sqlcipher\n\ndb 数据库浏览器 https://github.com/sqlitebrowser/sqlitebrowser\n\nSQLite 官方网站 https://www.sqlite.org/index.html","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbian-sh%2Fsqlite-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbian-sh%2Fsqlite-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbian-sh%2Fsqlite-test/lists"}