mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-02-01 15:23:03 +00:00
change some methods name, etc: _afterSelect to afterSelect
This commit is contained in:
parent
cb7cd63aec
commit
22bf598b33
112
doc/README.md
112
doc/README.md
@ -1,112 +0,0 @@
|
||||
## 文档
|
||||
|
||||
详细文档请见 <http://thinkjs.org/doc.html>
|
||||
|
||||
## 2.0需要改进的功能
|
||||
|
||||
### 强化websocket,封装socket.io, sockjs等几种常用的websocket库
|
||||
|
||||
1.x的websocket是基于websocket-driver模块来实现的,没有对应的浏览器端js库,有些用户可能不习惯。他们还是想直接用成熟的socket.io之类的库。
|
||||
|
||||
可以针对这些库做个adapter支持。
|
||||
|
||||
### 强化ORM, 支持mysql, mongodb等多种数据库
|
||||
|
||||
可以考虑使用一个第三方的orm库
|
||||
|
||||
### 强化Rest
|
||||
|
||||
1.x里支持rest需要在route.js里添加配置,不太友好。
|
||||
|
||||
可以根据识别哪些controller是继承rest.js来判断
|
||||
|
||||
### 完善单元测试,官网,文档。多写DEMO
|
||||
|
||||
一定要多写demo
|
||||
|
||||
文档改版,支持单一页面查看方式。更改文档书写格式,分为使用和开发2种
|
||||
|
||||
### 支持generator function
|
||||
|
||||
thinkjs代码里使用任何的generator代码,但需要支持项目里的generator代码。
|
||||
|
||||
调用项目里的方法或者函数时,通过下面的方式包装:
|
||||
|
||||
```
|
||||
var appFn = function*(){}
|
||||
var fn = think.co.wrap(appFn);
|
||||
fn(arg1, arg2).then(function(data){
|
||||
|
||||
})
|
||||
//如果appFn是一个类的方法,则需要重新bind this
|
||||
fn.bind(instance)(arg1, arg2).then(function(data){
|
||||
|
||||
})
|
||||
//或者通过call也可以
|
||||
var fn = think.co.wrap.call(instance, appFn);
|
||||
```
|
||||
|
||||
### 去除全局变量
|
||||
|
||||
已经去除,但thinkit模块下的方法是否写如到全局变量中可以通过一个配置来判断。
|
||||
|
||||
### 服务启动时自动安装缺少的依赖库
|
||||
|
||||
有些依赖的模块并不在依赖列表里,这样可以减少安装thinkjs所花的时间。但如果用户改了配置后,在服务启动时,需要自动安装依赖模块
|
||||
|
||||
### 支持国际化
|
||||
|
||||
添加common/config/local/en.js配置,各个模块下是否需要支持这样的配置?
|
||||
|
||||
### 考虑移动端的支持方式,换module?
|
||||
|
||||
可以加个middleware,通过配置自动更换module
|
||||
|
||||
### 对1.x系统的兼容方案
|
||||
|
||||
主要是全局变量和一些接口调用的问题
|
||||
|
||||
### tag -> hook, behavior -> middleware, driver -> adapter
|
||||
|
||||
将tag修改为hook, 并提供think.hook 和 this.hook方法
|
||||
|
||||
behavior改为middleware,使用middleware容易被接受
|
||||
|
||||
driver改为adapter
|
||||
|
||||
### think.config, this.config
|
||||
|
||||
支持模块下有独立的config文件,主要是让不同模块下可以自动调用不同的config。所以的配置在服务启动时直接读到内存中,避免用户请求时在产生文件io。
|
||||
|
||||
### 打包支持, grunt gulp
|
||||
|
||||
提供一套给grunt或者gulp的打包配置,方便外面的用户使用
|
||||
|
||||
### 权限认证
|
||||
|
||||
1.x里有auth.js,需要对其完善,并且可以支持其他类型的权限认证。
|
||||
|
||||
添加一个adapter
|
||||
|
||||
### 增加文件名检测机制
|
||||
|
||||
windows和mac文件名不区分大小写,但linux区分。需要增加文件名大小检测的机制。
|
||||
|
||||
避免上线后才出现文件找不到的情况。
|
||||
|
||||
### logic
|
||||
|
||||
增加参数默认值的通用处理
|
||||
|
||||
### 命令行模式下Model执行完后数据库连接自动关闭
|
||||
|
||||
|
||||
|
||||
|
||||
## 2.0开发规范
|
||||
|
||||
* 缩进使用2个空格,文件顶部添加`use strict`
|
||||
* 文件名全部使用小写和下划线
|
||||
* 所有代码都要写单元测试
|
||||
* 所有注释必须使用英文
|
||||
* 完全基于ES6来开发
|
||||
@ -1,55 +0,0 @@
|
||||
|
||||
|
||||
## 导航栏
|
||||
|
||||
左侧:thinkjs的logo 右侧:Documentation Demo Changelog 社区
|
||||
|
||||
## banner
|
||||
内容: A Node.js MVC Framework Support ES6 Class & Generator Function
|
||||
按钮: Getting Started
|
||||
|
||||
## github 相关信息
|
||||
|
||||
大概40px高度,里面放一些thinkjs的相关信息
|
||||
|
||||
## 代码图
|
||||
|
||||
放一张代码图,展示使用thinkjs和ES6特性来开发项目
|
||||
|
||||
## 特性
|
||||
|
||||
* 基于ES6和ES7开发 - 使用Babel编译,可运行在主流Node.js环境
|
||||
* 支持Generator Function - 异步处理如此简单
|
||||
* 支持丰富的数据库 - 支持Mysql, Sqlite, Mongodb等常见的数据库
|
||||
* Rest API - 自动生成Restful接口
|
||||
* 支持websocket - 支持常见的socket.io, sockjs等常见的websocket客户端
|
||||
* Hook & Middlearea - 可以很方便的处理http请求,随时结束
|
||||
* 丰富的Adapter - 快速切换Cache, Store, Session, Template等功能
|
||||
* 支持命令行 - 无缝使用命令行执行Node.js脚本
|
||||
* 自动更新 - 开发模式下,文件修改后立即生效
|
||||
|
||||
## 相关链接
|
||||
|
||||
### 友情链接
|
||||
|
||||
* 奇舞团博客
|
||||
* w3ctech
|
||||
* welefen
|
||||
|
||||
### 其他项目
|
||||
|
||||
* NovaUI
|
||||
* 奇舞周刊
|
||||
|
||||
### 文档
|
||||
|
||||
* 开发文档
|
||||
|
||||
### 联系我们
|
||||
* Github
|
||||
* QQ群
|
||||
* 微博
|
||||
|
||||
## 底部
|
||||
|
||||
@2015 thinkjs-team 居中
|
||||
47
doc/dev.md
47
doc/dev.md
@ -1,47 +0,0 @@
|
||||
## 2.0
|
||||
|
||||
### 参考文档
|
||||
|
||||
* http://laravel.com/docs/master/releases
|
||||
* http://www.yiiframework.com/doc-2.0/yii-db-migration.html#createTable()-detail
|
||||
* http://sailsjs.org/documentation/concepts/
|
||||
* http://docs.mongodb.org/manual/reference/operator/query/ mongdb where condition
|
||||
* http://docs.mongodb.org/manual/reference/sql-comparison/
|
||||
* http://mongodb.github.io/node-mongodb-native/2.0/api/Collection.html#count
|
||||
|
||||
### 遗留的问题
|
||||
|
||||
* validator需要改为laravel类似的方式,更加简洁 -- 已经完成 2015.08.07
|
||||
* 服务启动时增加文件名大小写的检测 -- 已经完成 2015.08.08
|
||||
* 完善mongodb -- 基于mongodb模块 -- 基本完成 2015.08.13
|
||||
* 重写websocket -- 基本完成 2015.08.21
|
||||
* 官网改版 -- 基本完成 2015.08.21
|
||||
* 错误页面美化 -- 基本完成 2015.08.21
|
||||
* ThinkJS创建项目的命令 - 已经完成 2015.08.25
|
||||
* 添加csrf检测,cors头信息设置的middleware - 已经完成 2015.09.12
|
||||
* cli模式下自动关闭socket的问题 - 已经完成 2015.09.15
|
||||
* base基类修改 - 已经完成,添加 think.http.base 2015.09.22
|
||||
|
||||
* 完善relationModel
|
||||
* 单元测试,代码覆盖率 >95%
|
||||
* 关键功能写DEMO
|
||||
* 在线文档
|
||||
* ThinkJS T-shirt
|
||||
|
||||
* 增加migration功能?
|
||||
* 打包个Vagrant环境?
|
||||
* 添加think.crontab接口?
|
||||
* grunt,gulp支持?
|
||||
|
||||
|
||||
## 其他
|
||||
|
||||
### 启动mongodb
|
||||
|
||||
```
|
||||
./mongod --dbpath=/data --port 27017
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
@ -388,7 +388,7 @@ export default class extends think.base {
|
||||
* @param {Object} options []
|
||||
* @return {} []
|
||||
*/
|
||||
_optionsFilter(options){
|
||||
optionsFilter(options){
|
||||
return options;
|
||||
}
|
||||
/**
|
||||
@ -396,7 +396,7 @@ export default class extends think.base {
|
||||
* @param {Object} data []
|
||||
* @return {} []
|
||||
*/
|
||||
_dataFilter(data){
|
||||
dataFilter(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
@ -404,7 +404,7 @@ export default class extends think.base {
|
||||
* @param {Object} data []
|
||||
* @return {} []
|
||||
*/
|
||||
_beforeAdd(data){
|
||||
beforeAdd(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
@ -412,7 +412,7 @@ export default class extends think.base {
|
||||
* @param {} data []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterAdd(data){
|
||||
afterAdd(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
@ -420,7 +420,7 @@ export default class extends think.base {
|
||||
* @param {Mixed} data []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterDelete(data){
|
||||
afterDelete(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
@ -428,7 +428,7 @@ export default class extends think.base {
|
||||
* @param {Mixed} data []
|
||||
* @return {} []
|
||||
*/
|
||||
_beforeUpdate(data){
|
||||
beforeUpdate(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
@ -437,14 +437,14 @@ export default class extends think.base {
|
||||
* @param {} options []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterUpdate(data){
|
||||
afterUpdate(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* after find
|
||||
* @return {} []
|
||||
*/
|
||||
_afterFind(data){
|
||||
afterFind(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
@ -452,7 +452,7 @@ export default class extends think.base {
|
||||
* @param {Mixed} result []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterSelect(data){
|
||||
afterSelect(data){
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
|
||||
@ -121,7 +121,7 @@ export default class extends Base {
|
||||
}
|
||||
});
|
||||
}
|
||||
return this._optionsFilter(options, fields);
|
||||
return this.optionsFilter(options, fields);
|
||||
}
|
||||
/**
|
||||
* parse where options
|
||||
@ -171,7 +171,7 @@ export default class extends Base {
|
||||
data[key] = this.parseType(key, val);
|
||||
}
|
||||
}
|
||||
return this._dataFilter(data);
|
||||
return this.dataFilter(data);
|
||||
}
|
||||
/**
|
||||
* add data
|
||||
@ -193,11 +193,11 @@ export default class extends Base {
|
||||
return think.reject(msg);
|
||||
}
|
||||
options = await this.parseOptions(options);
|
||||
data = await this._beforeAdd(data, options);
|
||||
data = await this.beforeAdd(data, options);
|
||||
data = this.parseData(data);
|
||||
await this.db().add(data, options, replace);
|
||||
let insertId = data[this.pk] = this.db().getLastInsertId();
|
||||
await this._afterAdd(data, options);
|
||||
await this.afterAdd(data, options);
|
||||
return insertId;
|
||||
}
|
||||
/**
|
||||
@ -231,7 +231,7 @@ export default class extends Base {
|
||||
options = await this.parseOptions(options);
|
||||
let promises = data.map(item => {
|
||||
item = this.parseData(item);
|
||||
return this._beforeAdd(item, options);
|
||||
return this.beforeAdd(item, options);
|
||||
});
|
||||
data = await Promise.all(promises);
|
||||
await this.db().addMany(data, options, replace);
|
||||
@ -241,7 +241,7 @@ export default class extends Base {
|
||||
let id = insertId + i;
|
||||
item[this.pk] = id;
|
||||
insertIds.push(id);
|
||||
return this._afterAdd(item, options);
|
||||
return this.afterAdd(item, options);
|
||||
});
|
||||
data = await Promise.all(promises);
|
||||
return insertIds;
|
||||
@ -254,7 +254,7 @@ export default class extends Base {
|
||||
async delete(options){
|
||||
options = await this.parseOptions(options);
|
||||
let rows = await this.db().delete(options);
|
||||
await this._afterDelete(options);
|
||||
await this.afterDelete(options);
|
||||
return rows;
|
||||
}
|
||||
/**
|
||||
@ -283,10 +283,10 @@ export default class extends Base {
|
||||
}
|
||||
|
||||
options = await this.parseOptions(options);
|
||||
data = await this._beforeUpdate(data, options);
|
||||
data = await this.beforeUpdate(data, options);
|
||||
data = this.parseData(data);
|
||||
let rows = await this.db().update(data, options);
|
||||
await this._afterUpdate(data, options);
|
||||
await this.afterUpdate(data, options);
|
||||
return rows;
|
||||
}
|
||||
/**
|
||||
@ -332,7 +332,7 @@ export default class extends Base {
|
||||
async find(options){
|
||||
options = await this.parseOptions(options, {limit: 1});
|
||||
let data = await this.db().select(options);
|
||||
return this._afterFind(data[0] || {}, options);
|
||||
return this.afterFind(data[0] || {}, options);
|
||||
}
|
||||
/**
|
||||
* select
|
||||
@ -341,7 +341,7 @@ export default class extends Base {
|
||||
async select(options){
|
||||
options = await this.parseOptions(options);
|
||||
let data = await this.db().select(options);
|
||||
return this._afterSelect(data, options);
|
||||
return this.afterSelect(data, options);
|
||||
}
|
||||
/**
|
||||
* select add
|
||||
|
||||
@ -85,7 +85,7 @@ export default class extends Base {
|
||||
|
||||
await this._createIndexes();
|
||||
|
||||
return this._optionsFilter(options);
|
||||
return this.optionsFilter(options);
|
||||
}
|
||||
/**
|
||||
* parse data
|
||||
@ -118,10 +118,10 @@ export default class extends Base {
|
||||
return think.reject(msg);
|
||||
}
|
||||
options = await this.parseOptions(options);
|
||||
data = await this._beforeAdd(data, options);
|
||||
data = await this.beforeAdd(data, options);
|
||||
data = this.parseData(data);
|
||||
await this.db().add(data, options);
|
||||
await this._afterAdd(data, options);
|
||||
await this.afterAdd(data, options);
|
||||
return this.db().getLastInsertId();
|
||||
}
|
||||
/**
|
||||
@ -150,9 +150,9 @@ export default class extends Base {
|
||||
return think.reject(err);
|
||||
}
|
||||
options = await this.parseOptions(options);
|
||||
data = await this._beforeAdd(data, options);
|
||||
data = await this.beforeAdd(data, options);
|
||||
await this.db().addMany(data, options);
|
||||
await this._afterAdd(data, options);
|
||||
await this.afterAdd(data, options);
|
||||
return this.db().getLastInsertId();
|
||||
}
|
||||
/**
|
||||
@ -162,7 +162,7 @@ export default class extends Base {
|
||||
async delete(options){
|
||||
options = await this.parseOptions(options);
|
||||
let data = await this.db().delete(options);
|
||||
await this._afterDelete(options);
|
||||
await this.afterDelete(options);
|
||||
return data.result.n || 0;
|
||||
}
|
||||
/**
|
||||
@ -177,7 +177,7 @@ export default class extends Base {
|
||||
delete data[pk];
|
||||
}
|
||||
let result = await this.db().update(data, options);
|
||||
await this._afterUpdate(data, options);
|
||||
await this.afterUpdate(data, options);
|
||||
return result.result.nModified || 0;
|
||||
}
|
||||
/**
|
||||
@ -203,7 +203,7 @@ export default class extends Base {
|
||||
async select(options){
|
||||
options = await this.parseOptions(options);
|
||||
let data = await this.db().select(options);
|
||||
return this._afterSelect(data, options);
|
||||
return this.afterSelect(data, options);
|
||||
}
|
||||
/**
|
||||
* count select
|
||||
@ -255,7 +255,7 @@ export default class extends Base {
|
||||
async find(options){
|
||||
options = await this.parseOptions(options, {limit: 1});
|
||||
let data = await this.db().select(options);
|
||||
return this._afterFind(data[0] || {}, options);
|
||||
return this.afterFind(data[0] || {}, options);
|
||||
}
|
||||
/**
|
||||
* increment field data
|
||||
|
||||
@ -81,7 +81,7 @@ export default class extends think.model.base {
|
||||
* @param {Object} data []
|
||||
* @return {Promise} []
|
||||
*/
|
||||
_afterFind(data, options){
|
||||
afterFind(data, options){
|
||||
return this.getRelation(data, options);
|
||||
}
|
||||
/**
|
||||
@ -89,7 +89,7 @@ export default class extends think.model.base {
|
||||
* @param {Object} data []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterSelect(data, options){
|
||||
afterSelect(data, options){
|
||||
return this.getRelation(data, options);
|
||||
}
|
||||
/**
|
||||
@ -313,7 +313,7 @@ export default class extends think.model.base {
|
||||
* @param {} parsedOptions []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterAdd(data, options){
|
||||
afterAdd(data, options){
|
||||
return this.postRelation('ADD', data, options);
|
||||
}
|
||||
/**
|
||||
@ -322,7 +322,7 @@ export default class extends think.model.base {
|
||||
* @param {} parsedOptions []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterDelete(data, options){
|
||||
afterDelete(data, options){
|
||||
return this.postRelation('DELETE', data, options);
|
||||
}
|
||||
/**
|
||||
@ -331,7 +331,7 @@ export default class extends think.model.base {
|
||||
* @param {} parsedOptions []
|
||||
* @return {} []
|
||||
*/
|
||||
_afterUpdate(data, options){
|
||||
afterUpdate(data, options){
|
||||
return this.postRelation('UPDATE', data, options);
|
||||
}
|
||||
/**
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "thinkjs-project",
|
||||
"description": "project created by thinkjs",
|
||||
"name": "thinkjs-application",
|
||||
"description": "application created by thinkjs",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"start": "node www/index.js",
|
||||
@ -8,7 +8,8 @@
|
||||
"watch-compile": "npm run compile -- --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"thinkjs": "2.0.0",
|
||||
"babel": "5.8.21",
|
||||
"babel-runtime": "5.6.17"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -339,39 +339,39 @@ describe('model/_base.js', function(){
|
||||
assert.equal(data, instance);
|
||||
assert.deepEqual(instance._options.explain, 'name');
|
||||
})
|
||||
it('_optionsFilter', function(){
|
||||
it('optionsFilter', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._optionsFilter('data');
|
||||
var data = instance.optionsFilter('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('_dataFilter', function(){
|
||||
it('dataFilter', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._dataFilter('data');
|
||||
var data = instance.dataFilter('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('_afterAdd', function(){
|
||||
it('afterAdd', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._afterAdd('data');
|
||||
var data = instance.afterAdd('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('_afterDelete', function(){
|
||||
it('afterDelete', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._afterDelete('data');
|
||||
var data = instance.afterDelete('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('_afterUpdate', function(){
|
||||
it('afterUpdate', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._afterUpdate('data');
|
||||
var data = instance.afterUpdate('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('_afterFind', function(){
|
||||
it('afterFind', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._afterFind('data');
|
||||
var data = instance.afterFind('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('_afterSelect', function(){
|
||||
it('afterSelect', function(){
|
||||
var instance = new Base('user', think.config('db'));
|
||||
var data = instance._afterSelect('data');
|
||||
var data = instance.afterSelect('data');
|
||||
assert.equal(data, 'data');
|
||||
})
|
||||
it('data, get', function(){
|
||||
|
||||
@ -67,22 +67,22 @@ describe('model/relation.js', function(){
|
||||
assert.equal(value, instance);
|
||||
assert.deepEqual(instance._relationName, [])
|
||||
})
|
||||
it('_afterFind', function(done){
|
||||
it('afterFind', function(done){
|
||||
var instance = new Relation('user', think.config('db'));
|
||||
instance.getRelation = function(data, options){
|
||||
return Promise.resolve([{name: 1}]);
|
||||
}
|
||||
instance._afterFind([], {}).then(function(data){
|
||||
instance.afterFind([], {}).then(function(data){
|
||||
assert.deepEqual(data, [{name: 1}])
|
||||
done();
|
||||
});
|
||||
})
|
||||
it('_afterSelect', function(done){
|
||||
it('afterSelect', function(done){
|
||||
var instance = new Relation('user', think.config('db'));
|
||||
instance.getRelation = function(data, options){
|
||||
return Promise.resolve([{name: 1}]);
|
||||
}
|
||||
instance._afterSelect([], {}).then(function(data){
|
||||
instance.afterSelect([], {}).then(function(data){
|
||||
assert.deepEqual(data, [{name: 1}])
|
||||
done();
|
||||
});
|
||||
@ -346,26 +346,26 @@ describe('model/relation.js', function(){
|
||||
}], {fKey: 'user_id', key: 'id', name: 'cate'});
|
||||
assert.deepEqual(data, [{"id":10,"name":"thinkjs","cate":{"user_id":10,"title":"title"}}])
|
||||
})
|
||||
it('_afterAdd', function(){
|
||||
it('afterAdd', function(){
|
||||
var instance = new Relation('user', think.config('db'));
|
||||
instance.postRelation = function(type){
|
||||
assert.equal(type, 'ADD')
|
||||
}
|
||||
instance._afterAdd();
|
||||
instance.afterAdd();
|
||||
})
|
||||
it('_afterDelete', function(){
|
||||
it('afterDelete', function(){
|
||||
var instance = new Relation('user', think.config('db'));
|
||||
instance.postRelation = function(type){
|
||||
assert.equal(type, 'DELETE')
|
||||
}
|
||||
instance._afterDelete();
|
||||
instance.afterDelete();
|
||||
})
|
||||
it('_afterUpdate', function(){
|
||||
it('afterUpdate', function(){
|
||||
var instance = new Relation('user', think.config('db'));
|
||||
instance.postRelation = function(type){
|
||||
assert.equal(type, 'UPDATE')
|
||||
}
|
||||
instance._afterUpdate();
|
||||
instance.afterUpdate();
|
||||
})
|
||||
it('getRelationTableName', function(){
|
||||
var instance = new Relation('post', think.config('db'));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user