v1p3r75/nexa-orm
Composer 安装命令:
composer require v1p3r75/nexa-orm
包简介
NexaORM is a modern PHP Object-Relational Mapping (ORM) library designed to simplify database interactions and streamline the development of PHP applications.
README 文档
README
Introduction
NexaORM is a modern PHP Object-Relational Mapping (ORM) library designed to simplify database interactions and streamline the development of PHP applications. It provides a lightweight and intuitive way to manage database entities, relationships, and queries.
Features
-
Attribute Annotations (Entities): Define entity properties using expressive annotations, making it easy to map database columns to PHP properties.
-
Models: Provide a foundation for representing and managing data objects within the application.
-
Simplified Query Building: Construct database queries effortlessly with a simple and intuitive query builder.
-
Relationships: Define and work with relationships between entities using straightforward annotations.
-
Auto-Migration: NexaORM includes an auto-migration feature that simplifies the process of updating the database schema to match changes in entity definitions.
-
Flexible Configuration: NexaORM is designed with flexibility in mind, allowing developers to adapt the library to their specific project requirements.
Why NexaORM?
Intelligent Auto-Generated Migrations:
Say goodbye to tedious manual migration creation! NexaORM's intelligent auto-generation feature analyzes your entities and creates the necessary migrations to update your database schema accordingly. This powerful feature offers several benefits:
-
Save Time and Effort: Eliminate the time-consuming and error-prone process of writing migrations manually.
-
Reduced Errors: Ensure consistency between your entities and database schema, minimizing the risk of errors and data inconsistencies.
-
Efficient Development: Streamline your development workflow by automating a crucial step in database management.
-
Effortless Database Management: NexaORM takes database management to the next level by simplifying and automating various tasks:
-
Automatic Schema Updates: Easily update your database schema to match your evolving entities without manual intervention.
-
Rollback Support: Safely revert to a previous database version if necessary, providing a safety net in case of unexpected issues.
-
Version Control Integration: Integrate your migrations with version control systems, enabling seamless collaboration and tracking of changes.
Seamless Integration:
NexaORM seamlessly integrates with your existing development environment:
- Works with Any Framework: Use NexaORM with any PHP framework, including Laravel, Symfony, and CodeIgniter.
- Flexible Configuration: Customize NexaORM's behavior to match your specific project requirements.
- Extensible Architecture: Extend NexaORM's functionality with custom plugins and modules.
Community and Support:
Join a vibrant community of developers and contributors who actively support NexaORM:
- Detailed Documentation: Access comprehensive documentation covering all aspects of NexaORM usage.
- Responsive Support: Get help and answers to your questions from the NexaORM community and maintainers.
- Continuous Development: Benefit from regular updates and new features driven by the active NexaORM community.
Choose NexaORM and unlock the power of intelligent auto-generated migrations, effortless database management, seamless integration, and a supportive community. Embrace a more efficient and error-free development workflow for your PHP applications.
Installation
Use Composer to install the package:
composer require v1p3r75/nexa-orm
Preview
// Define entity #[Entity] class UserEntity { #[PrimaryKey] #[SmallInt] #[AutoIncrement(true)] public int $id; #[Strings] #[DefaultValue('John')] public string $username; #[Number] #[ForeignKey(ProfileEntity::class, 'id', [Nexa::ON_DELETE => Nexa::CASCADE, Nexa::ON_UPDATE => Nexa::CASCADE])] #[Comment('user profile')] #[Nullable] public int $profile; #[DateAndTime] #[DefaultValue(Nexa::DATETIME_NOW)] public DateTime $created_at; }
// Create a model for database interation use Nexa\Models\Model; use Nexa\Test\Entities\UserEntity; class User extends Model { protected $entity = UserEntity::class; } User::insert(['username' => 'John Doe', 'email' => 'johndoe@test.com'])
Authors
- Fortunatus KIDJE (v1p3r75) - Main Developer
Resources
- GitHub Repository: https://github.com/v1p3r75/NexaORM
v1p3r75/nexa-orm 适用场景与选型建议
v1p3r75/nexa-orm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 49 次下载、GitHub Stars 达 6, 最近一次更新时间为 2024 年 03 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「orm」 「nexa」 「nexa-orm」 「nexaORM」 「Nexa PHP」 「ORM PHP」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 v1p3r75/nexa-orm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 v1p3r75/nexa-orm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 v1p3r75/nexa-orm 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Kinikit - PHP Application development framework MVC component
PHP Database ORM for Symfony1. Do NOT use for new projects: please move to a newest Symfony release and Doctrine2
Nexa merchant Apps api
PeskyORM - annoying ORM that contains tons of exceptions and throws them when anything goes wrong
Nexa merchant Apps api
An ORM solution for Salesforce Object Query Language (SOQL)
统计信息
- 总下载量: 49
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-04