ODB Examples
http://www.codesynthesis.com/products/odb/examples.xhtml
The following list gives an overview of the examples available in the odb-examples
package. Each example is linked to its source code in the repository which also includes a README file with a more detailed description of the example.
- A "Hello World" example that shows how to use ODB to perform basic database operations.
- Shows how to use the ODB Query Language to search the database for persistent objects matching certain criteria.
- Shows how to declare and use composite value types.
- Shows how to use containers as data members in persistent objects.
- Shows how to declare and use unidirectional to-one and to-many relationships.
- Shows how to declare and use bidirectional one-to-one, one-to-many, and many-to-many relationships.
- Shows how to use reuse-style inheritance.
- Shows how to use polymorphism-style inheritance.
- Shows how to use object sections to implement lazy-loading and change-updating of a subset of data members in a persistent class.
- Shows how to define and use object, table, mixed, and native views.
- Shows how to use prepared queries.
- Shows how to use optimistic concurrency.
- Shows how to use virtual data members to implement a persistent class that employs the pimpl C++ idiom.
- Shows various approaches used by ODB to access data members that cannot be accessed directly.
- Shows how to use ODB with C++11.
- Shows how to persist objects that use Boost smart pointers, containers, and value types with the help of the Boost profile library (
libodb-boost
).
- Shows how to persist objects that use Qt smart pointers, containers, and value types with the help of the Qt profile library (
libodb-qt
).
- Shows how to generate and use a database schema that is embedded into the application.
- Shows how to map persistent C++ classes to a custom database schema.
- Shows how to customize the mapping between C++ value types and database types.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· winform 绘制太阳,地球,月球 运作规律
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人