Model
└─Merge
public class Merge
extends Model
Constructor Summary | |
---|---|
void | __construct(array|object data) 架构函数 |
Method Summary | |
---|---|
static \think\Model | get(mixed data, string with, bool cache) 查找单条记录 |
protected static \think\db\Query | attachQuery(\think\db\Query query) 附加查询表达式 |
protected static array | getModelField(\think\db\Query query, string name, string table, array map) 获取关联模型的字段 并解决混淆 |
static array|false|string | all(mixed data, string with, bool cache) 查找所有记录 |
protected void | parseData(string model, array data, bool insert) 处理写入的模型数据 |
integer|false | save(array data, array where, string sequence) 保存模型数据 以及关联数据 |
integer | delete() 删除当前的记录 并删除关联数据 |
Methods inherited from think\Model | |
---|---|
__construct, all, allowField, append, auto, autoCompleteData, autoWriteTimestamp, belongsTo, belongsToMany, create, data, db, delete, destroy, eagerlyResult, eagerlyResultSet, event, get, getAttr, getData, getDb, getError, getPk, has, hasMany, hasManyThrough, hasOne, hasWhere, hidden, init, initialize, isPk, isUpdate, jsonSerialize, offsetExists, offsetGet, offsetSet, offsetUnset, parseModel, parseQuery, readTransform, relation, relationQuery, save, saveAll, scope, setAttr, toArray, toJson, trigger, update, useGlobalScope, validate, validateData, validateFailException, visible, writeTransform |
public void __construct(array|object data)
架构函数
public static \think\Model get(mixed data, string with, bool cache)
查找单条记录
protected static \think\db\Query attachQuery(\think\db\Query query)
附加查询表达式
protected static array getModelField(\think\db\Query query, string name, string table, array map)
获取关联模型的字段 并解决混淆
public static array|false|string all(mixed data, string with, bool cache)
查找所有记录
protected void parseData(string model, array data, bool insert)
处理写入的模型数据
public integer|false save(array data, array where, string sequence)
保存模型数据 以及关联数据
public integer delete()
删除当前的记录 并删除关联数据
Class Model