承接 utechnology/dbsdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

utechnology/dbsdk

最新稳定版本:1.1.3

Composer 安装命令:

composer require utechnology/dbsdk

包简介

SDK tools for using DB from php object

README 文档

README

DbSDK è un ORM leggero e potente per PHP che semplifica la gestione del database eliminando la necessità di scrivere query SQL manualmente.
Attualmente supporta MySQL, con il supporto a PostgreSQL in fase di sviluppo.

🌟 Caratteristiche principali

Gestione automatica delle query (INSERT, UPDATE, DELETE, SELECT)
Supporto per MySQL (PostgreSQL in arrivo)
Configurazione minimale
Semplice e intuitivo – usa le classi come tabelle senza query SQL

📚 Installazione

Installa DbSDK con Composer:

composer require utechnology/dbsdk

🔧 Configurazione

Configura il database nel tuo progetto:

use UTechnology\DbSDK\ConfigConnection;

ConfigConnection::settingConnectionMySQL(
                                        'localhost',
                                        'nome_database',
                                        'utente', 
                                        'password'
);

🛠 Esempio d'uso

1️⃣ Creazione di un modello

use FieldName;
use IsAutoIncrement;
use IsPrimaryKeyField;
use TableName;
use UTechnology\DbSDK\__EntityDB;

#[TableName('UserAssociation')]
class User extends __EntityDB
{
    public function __construct(mixed $ID = null) {
        parent::__construct($ID);
    }

    #[IsPrimaryKeyField]
    #[IsAutoIncrement]
    #[FieldName('ID')]
    public int $ID;

    #[FieldName('Name')]
    public string $name;

    #[FieldName('Email')]
    public string $email;
}

2️⃣ Inserimento di un record

$user = new User();
$user->name = "Mario Rossi";
$user->email = "mario@example.com";
$user->__save();  // INSERT automatico

3️⃣ Selezione di un record

$user = new User(1);  // Trova l'utente con ID 1
echo $user->name;

4️⃣ Aggiornamento di un record

$user->email = "nuovaemail@example.com";
$user->__save();  // UPDATE automatico

5️⃣ Eliminazione di un record

$user->__delete();  // DELETE automatico

📖 Documentazione

Consulta la documentazione completa per dettagli su tutte le funzionalità.

💜 Licenza

DbSDK è rilasciato sotto la licenza MIT.

🌍 English Version

🚀 DbSDK – Your PHP ORM


\

DbSDK is a lightweight and powerful PHP ORM that simplifies database management by eliminating the need to write SQL queries manually.
Currently supports MySQL, with PostgreSQL support in development.

🌟 Key Features

Automatic query handling (INSERT, UPDATE, DELETE, SELECT)
MySQL support (PostgreSQL coming soon)
Minimal configuration
Simple and intuitive – use classes as database tables without writing SQL

📚 Installation

Install DbSDK via Composer:

composer require utechnology/dbsdk

🔧 Configuration

Set up your database connection:

use UTechnology\DbSDK\ConfigConnection;

ConfigConnection::settingConnectionMySQL(
                                        'localhost',
                                        'nome_database',
                                        'utente', 
                                        'password'
);

🛠 Usage Example

1️⃣ Creating a Model

use FieldName;
use IsAutoIncrement;
use IsPrimaryKeyField;
use TableName;
use UTechnology\DbSDK\__EntityDB;

#[TableName('UserAssociation')]
class User extends __EntityDB
{
    public function __construct(mixed $ID = null) {
        parent::__construct($ID);
    }

    #[IsPrimaryKeyField]
    #[IsAutoIncrement]
    #[FieldName('ID')]
    public int $ID;

    #[FieldName('Name')]
    public string $name;

    #[FieldName('Email')]
    public string $email;
}

2️⃣ Inserting a Record

$user = new User();
$user->name = "Mario Rossi";
$user->email = "mario@example.com";
$user->__save();  // Automatic INSERT

3️⃣ Selecting a Record

$user = new User(1);  // Find user with ID 1
echo $user->name;

4️⃣ Updating a Record

$user->email = "nuovaemail@example.com";
$user->__save();  // Automatic UPDATE

5️⃣ Deleting a Record

$user->__delete();  // Automatic DELETE

📖 Documentation

Check out the full documentation for more details.

💜 License

DbSDK is released under the MIT License.

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-03-03