项目介绍

vrana/notorm 是一个托管在 GitHub 上的开源项目,主要使用 PHP 编写,目前获得 849 个 Star、152 次 Fork。

仓库全名
vrana/notorm
Star 数
849
Fork 数
152

README 摘要

NotORM NotORM is a PHP library for simple working with data in the database. The most interesting feature is a very easy work with table relationships. The overall performance is also very important and NotORM can actually run faster than a native driver. Official Website Requirements PHP 8.0+ Any database supported by PDO (tested with MySQL, SQLite, PostgreSQL, MS SQL, Oracle) Installation Upgrading from NotORM 1…

完整内容见 GitHub 原始 README 或本页 。

常见问题

notorm 用什么语言开发?

主要使用 PHP 编写,目前有 849 个 Star。

如何获取 notorm 的源码?

可以直接克隆仓库:git clone https://github.com/vrana/notorm.git,默认分支为 main;安装与运行步骤见仓库 README。

notorm 最近还在维护吗?

仓库最近一次更新为 2 周前,当前没有未关闭的 Issue;Star 数为 849,可作为社区活跃度的参考。

关于

NotORM - PHP library for simple reading data from the database

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
1212
价值分
560
活跃状态
活跃
暂无主题

语言占比

PHP

README

NotORM

NotORM is a PHP library for simple working with data in the database. The most interesting feature is a very easy work with table relationships. The overall performance is also very important and NotORM can actually run faster than a native driver.

Official Website

Requirements

  • PHP 8.0+
  • Any database supported by PDO (tested with MySQL, SQLite, PostgreSQL, MS SQL, Oracle)

Installation

composer require vrana/notorm

Upgrading from NotORM 1: see upgrade/README.md.

Usage

<?php
require "vendor/autoload.php";
$pdo = new PDO("mysql:dbname=software");
$db = new NotORM\NotORM($pdo);

foreach ($db->application()->order("title") as $application) { // get all applications ordered by title
    echo "$application[title]\n"; // print application title
    echo $application->author["name"] . "\n"; // print name of the application author
    foreach ($application->application_tag() as $application_tag) { // get all tags of $application
        echo $application_tag->tag["name"] . "\n"; // print the tag name
    }
}

Development

  • composer check - Checks the code by PHP_CodeSniffer and PHPStan
  • composer test - Runs the tests, see tests/README.md for setting up the databases

评论

暂无评论