选择语言 :

Module_OOP_ORM

MyQEE ORM 核心类

常量
OOP_ORM::VERSION string(5) "2.3.1"
OOP_ORM::PARAM_RETURN_FINDER string(6) "finder"
OOP_ORM::PARAM_RETURN_SINGLE string(6) "single"
OOP_ORM::PARAM_RETURN_GROUP string(5) "group"

API - Module_OOP_ORM

author
呼吸二氧化碳 jonwang@myqee.com
category
Module
package
ORM
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

$this->__construct( )


$this->get_orm_name( $type )

获取对象名称

参数列表

参数 类型 描述 默认值
$type string $type

$this->create( $data = null, $is_field_key = false)

创建一条数据 $is_field_key 是所传进来的数据的key是对象的键名还是字段的键名,true=字段的键名,false=对象的键名 差别在于: 由于ORM DATA的键名可以和数据库的字段名称不一样,所以在设置数据的时候需要指定是哪个数据,如果键名和数据库的字段名完全一样,这样的话则没有区别

参数列表

参数 类型 描述 默认值
$data array 数据 null
$is_field_key boolean 数据的键名是否数据库字段,默认false bool false

$this->driver( )


$this->find( )


$this->create_group_data( $array , $is_field_key = false)

返回ORM数据对象

参数列表

参数 类型 描述 默认值
$array $array
$is_field_key boolean 数据的键名是否数据库字段,默认false bool false
返回值
  • OOP_ORM_Result

$this->set_auto_where( $auto_where )

设置自动添加条件

参数列表

参数 类型 描述 默认值
$auto_where array $auto_where

$this->clear_auto_where( )

清除自动添加条件


$this->id_field_name( )


$this->get_by_id( $id , $use_master = false)

根据ID获取对象

参数列表

参数 类型 描述 默认值
$id $id Int 对象ID
$use_master $use_master Boolean 是否使用主数据 bool false

$this->get_by_ids( $ids , $use_master = false)

根据IDs获取对象

参数列表

参数 类型 描述 默认值
$ids $use_master Boolean 是否使用主数据
$use_master unknown bool false
返回值
  • OOP_ORM_Result

$this->last_query( )

返回最后查询语句

返回值
  • string