{"id":17241761,"url":"https://github.com/j256/ormlite-core","last_synced_at":"2025-05-14T04:07:35.355Z","repository":{"id":7333015,"uuid":"8654828","full_name":"j256/ormlite-core","owner":"j256","description":"Core ORMLite functionality that provides a lite Java ORM in conjunction with ormlite-jdbc or ormlite-android","archived":false,"fork":false,"pushed_at":"2025-02-23T00:38:54.000Z","size":23366,"stargazers_count":589,"open_issues_count":30,"forks_count":213,"subscribers_count":38,"default_branch":"main","last_synced_at":"2025-04-10T22:29:15.435Z","etag":null,"topics":["database","java","orm","ormlite"],"latest_commit_sha":null,"homepage":"http://ormlite.com/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j256.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":"j256","patreon":"j256"}},"created_at":"2013-03-08T16:25:59.000Z","updated_at":"2025-03-21T08:24:11.000Z","dependencies_parsed_at":"2024-06-19T01:50:36.617Z","dependency_job_id":"81cfba09-5dc4-4a90-990e-038f69397d92","html_url":"https://github.com/j256/ormlite-core","commit_stats":{"total_commits":1925,"total_committers":32,"mean_commits":60.15625,"dds":"0.32051948051948054","last_synced_commit":"be0031eeaf41122f12914e180ca21c6c9d9bc375"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Formlite-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Formlite-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Formlite-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j256%2Formlite-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j256","download_url":"https://codeload.github.com/j256/ormlite-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254069216,"owners_count":22009511,"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":["database","java","orm","ormlite"],"created_at":"2024-10-15T06:11:10.538Z","updated_at":"2025-05-14T04:07:35.316Z","avatar_url":"https://github.com/j256.png","language":"Java","readme":"ORMLite Core\n============\n\nThis package provides the core functionality for the JDBC and Android packages.  Users that are connecting to SQL\ndatabases via JDBC should download the [ormlite-jdbc](https://github.com/j256/ormlite-jdbc) package instead which\nincludes these core classes. Android users should download the\n[ormlite-android](https://github.com/j256/ormlite-android) package instead which also includes these core classes.\n\n* For more information, visit the [ORMLite home page](http://ormlite.com/).\t\n* Online documentation can be found off the home page.  Here's the [getting started information](http://ormlite.com/docs/getting-started).\nHere are the Javadocs for the code: [![javadoc](https://javadoc.io/badge2/com.j256.ormlite/ormlite-core/javadoc.svg)](https://javadoc.io/doc/com.j256.ormlite/ormlite-core)\n* Browse the code on the [git repository](https://github.com/j256/ormlite-core).  [![CircleCI](https://circleci.com/gh/j256/ormlite-core.svg?style=svg)](https://circleci.com/gh/j256/ormlite-core) [![CodeCov](https://img.shields.io/codecov/c/github/j256/ormlite-core.svg)](https://codecov.io/github/j256/ormlite-core/)\n* Maven packages are published via [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.j256.ormlite/ormlite-core/badge.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/com.j256.ormlite/ormlite-core/)\n* I've published a [number of example programs](http://ormlite.com/docs/examples).\n\nORMLite is easy to use and provides the following features:\n\n* Setup your classes by simply adding [Java annotations](http://ormlite.com/docs/annotations).\n* Powerful abstract [Database Access Object (DAO) classes](http://ormlite.com/docs/dao-setup).\n* Flexible [query builder](http://ormlite.com/docs/query-builder) to easily construct simple and complex queries.\n* Supports MySQL, Postgres, Microsoft SQL Server, H2, Derby, HSQLDB, and Sqlite and can be extended to additional databases relatively easily.\n* Provisional support for DB2, Oracle, ODBC, and Netezza. Contact the author if your database type is not supported.\n* Handles \"compiled\" SQL statements for repetitive query tasks.\n* Supports [\"foreign\" objects](http://ormlite.com/docs/foreign-object) with the class field being the object but an id stored in the database table.\n* Basic support for [database transactions](http://ormlite.com/docs/transactions).\n* Auto generates SQL to create and drop database tables.\n* [Spring configuration support](http://ormlite.com/docs/spring) for DOAs and class configurations.\n* Support for [configuring of tables](http://ormlite.com/docs/table-config) and fields without annotations.\n* Supports native calls to [Android SQLite database APIs](http://ormlite.com/docs/android).\n\nEnjoy, Gray Watson\n\n# Code Example\n\nThe following is a quick code example to give you a taste on how to use the library.\n\n    // this uses h2 but you can change it to match your database\n    String databaseUrl = \"jdbc:h2:mem:account\";\n    // create a connection source to our database\n    ConnectionSource connectionSource = new JdbcConnectionSource(databaseUrl);\n    \n    // instantiate the DAO to handle Account with String id\n    Dao\u003cAccount,String\u003e accountDao = DaoManager.createDao(connectionSource, Account.class);\n    \n    // if you need to create the 'accounts' table make this call\n    TableUtils.createTable(connectionSource, Account.class);\n    \n    // create an instance of Account\n    String name = \"Jim Smith\";\n    Account account = new Account(name, \"_secret\");\n    \n    // persist the account object to the database\n    accountDao.create(account);\n    \n    // retrieve the account\n    Account account2 = accountDao.queryForId(name);\n    // show its password\n    System.out.println(\"Account: \" + account2.getPassword());\n    \n    // close the connection source\n    connectionSource.close();\n\n# Logging Information\n\nORMLite has copied in logging code from [SimpleLogging](https://256stuff.com/sources/simplelogging/) which backends to a number of different logging systems and is configurable via code or configuration.  For more details see the [logging documentation](https://ormlite.com/docs/logging).\n\n# Maven Configuration\n\nFor JDBC usage, you should depend on [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.j256.ormlite/ormlite-jdbc/badge.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/com.j256.ormlite/ormlite-jdbc/) which includes the core classes.\n\n``` xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.j256.ormlite\u003c/groupId\u003e\n\t\u003cartifactId\u003eormlite-jdbc\u003c/artifactId\u003e\n\t\u003cversion\u003e6.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor Android usage, you should depend on [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.j256.ormlite/ormlite-android/badge.svg?style=flat-square)](https://maven-badges.herokuapp.com/maven-central/com.j256.ormlite/ormlite-android/) which includes the core classes.\n\n``` xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.j256.ormlite\u003c/groupId\u003e\n\t\u003cartifactId\u003eormlite-android\u003c/artifactId\u003e\n\t\u003cversion\u003e6.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n# ChangeLog Release Notes\n\nSee the [ChangeLog.txt file](src/main/javadoc/doc-files/changelog.txt).\n","funding_links":["https://github.com/sponsors/j256","https://patreon.com/j256"],"categories":["数据库开发"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj256%2Formlite-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj256%2Formlite-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj256%2Formlite-core/lists"}