ThinkJS 2.0 中文文档md5('think_' + data.pwd); //���������������������� let result = await this.model('user').where({name: data.name, pwd: md5}).find(); //���������������������� if(think.isEmpty(result)){ self��������������� self this.model('user').find().then(function(data){ return self.model('article').where({user_id: data.id}).select(); }).then(function(data){ self.success(data); }) } function(self){ this.model('user').find().then(function(data){ return self.model('article').where({user_id: data.id}).select(); }).then(function(data){ self.success(data); }) }0 码力 | 238 页 | 1.87 MB | 1 年前3
ThinkJS 3.0 中文文档let data = await this.field('title, content').where({ id: ['>', 100] }).order('id DESC').select(); ... } } 模型中支持链式调用的方法有: where , 用于查询或者更新条件的定义 table , 用于定义要操作的数据表名称 alias , 用于给当前数据表定义别名 affectedRows = await model.where({name: 'thinkjs'}).update({email: 'admin@ thinkjs.org'}); } } 默认情况下更新数据必须添加 where 条件,以防止误操作导致所有数据被错误的更新。如果确认 是更新所有数据的需求,可以添加 1=1 的 where 条件进行,如: module.exports = class { async updateAction(){ let model = this.model('user'); let affectedRows = await model.where('1=1').update({email: 'admin@thinkjs.org' }); } } 有时候更新值需要借助数据库的函数或者其他字段,这时候可以借助 exp 来完成。 export0 码力 | 129 页 | 2.12 MB | 1 年前3
ThinkJS 2.2 中文文档校验 let data = this.post(); //⽤用户名去匹配数据库中对应的条⽬目 let result = await this.model('user').where({name: data.name}).find(); if(!validateLogin(result)){ return this.fail('login fail'); self,然后在后⾯面的回调函数⾥里里都使⽤用 self this.model('user').find().then(function(data){ return self.model('article').where({user_id: data.id}).select(); }).then(function(data){ self.success(data); }) } }) function(self){ this.model('user').find().then(function(data){ return self.model('article').where({user_id: data.id}).select(); }).then(function(data){ self.success(data); }) } })0 码力 | 277 页 | 3.61 MB | 1 年前3
ThinkJS 1.2 中文文档由于数据库操作都是异步的,执⾏行 find() ⽅方法后,并不能返回结果,⽽而是返回⼀一个 promise,在 promise.then ⽅方法⾥里可以拿到对应的数据。 系统⽀支持的链式调⽤用有: where , ⽤用于查询或者更新条件的定义 table , ⽤用于定义要操作的数据表名称 alias , ⽤用于给当前数据表定义别名 data , ⽤用于新增或者更新数据之前的数据对象赋值 field model = D('User', C('ext_db_config')); JavaScript 链式调⽤用 var promise = D('User').where({name: 'welefen'}).field('sex,date').find().then(function(data){ //data 为当 条)的话,⼀一次插⼊入可能会导致报错,请⾃自⾏行切割分块插⼊入。 更新数据使⽤用 update ⽅方法,如: js // 更新 email 为 welefen@gmail.com ⽤用户的密码 D('User').where({email: "welefen@gmail.com"}).update({pwd: "xxx"}).then(function(affectedRows){ //affectedRows 为影响的⾏行数0 码力 | 104 页 | 1.29 MB | 1 年前3
百度智能云 Apache Doris 文档Baidu 百度智能云文档 SQL手册 6 字面常量 Doris中的每种数据类型都会对应着一种该类型的Literal。用户可以在SQL语句中指定Literal,比如在select的list中,where从句 中以及函数的参数中。 数字字面常量 数字字面常量 整型类型(TINYINT, SMALLINT, INT, 和BIGINT)的字面常量是一系列数字,这些数字前可以加些0。 浮点类型( 户可以指定时间类型 为‘2010-01-01’,或者'2010-01-01 10:10:10'。 SQL操作符 SQL操作符是一系列用于比较的函数,这些操作符广泛的用于select 语句的where从句中。 算数操作符 算数操作符 算术操作符通常出现在包含左操作数,操作符,(大部分情况下)右操作数组成的表达式中。 +和-:可以作为单元或2元操作符。当其作为单元操作符时,如+1, -2.5 过来,数学函数也没有对应的算术 操作符。比如幂函数POW()并没有相应的 **求幂操作符。用户可以通过数学函数章节了解我们支持哪些算术函数。 Between操作符 Between操作符 在where从句中,表达式可能同时和上界和下界比较。如果表达式大于等于下界,同时小于等于上界的话,比较的结果是true。 语法: 数据类型:通常expression的计算结果都是数字类型,该操作符也支持其0 码力 | 203 页 | 1.75 MB | 1 年前3
httpd 2.4.25 中文文档on a later stage or just migrate everything in bulk. In many configurations with authentication, where the value of the Satisfy was the default of ALL, snippets that simply disabled host- based access AuthUserFile /example.com/conf/users.passwd AuthName secure Require valid-user In configurations where both authentication and access control were meaningfully combined, the access control directives should secureRequire valid-user Require ip 127.0.0.1 In configurations where both authentication and access control were meaningfully combined, the access control directives should0 码力 | 2573 页 | 2.12 MB | 1 年前3
httpd 2.4.20 中文文档Formerly a third-party module, this supports fixing of HTML links in a reverse proxy situation, where the backend generates URLs that are not valid for the proxy's clients. mod_sed An advanced replacement the responder designated in the client certificate itself. mod_ssl now also supports OCSP stapling, where the server pro-actively obtains an OCSP verification of its certificate and transmits that to the in the filter chain to provide fine control over caching. mod_cache can now cache HEAD requests. Where possible, mod_cache directives can now be set per directory, instead of per server. The base URL0 码力 | 2533 页 | 2.09 MB | 1 年前3
httpd 2.4.23 中文文档Formerly a third-party module, this supports fixing of HTML links in a reverse proxy situation, where the backend generates URLs that are not valid for the proxy's clients. mod_sed An advanced replacement the responder designated in the client certificate itself. mod_ssl now also supports OCSP stapling, where the server pro-actively obtains an OCSP verification of its certificate and transmits that to the in the filter chain to provide fine control over caching. mod_cache can now cache HEAD requests. Where possible, mod_cache directives can now be set per directory, instead of per server. The base URL0 码力 | 2559 页 | 2.11 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.1现笛卡尔积关联,关联查询效率将大大提升。举例说明,如果 SQL 为: SELECT i.* FROM t_order o JOIN t_order_item i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); 在不配置绑定表关系时,假设分片键 order_id 将数值 10 路由至第 0 片,将数值 11 路由至第 1 片,那 么路由后的 SQL JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); SELECT i.* FROM t_order_0 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); 4.3. 数据分片 27 Apache JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); SELECT i.* FROM t_order_1 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); 在配置绑定表关系,并且使用 order_id0 码力 | 409 页 | 4.47 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.0现笛卡尔积关联,关联查询效率将大大提升。举例说明,如果 SQL 为: SELECT i.* FROM t_order o JOIN t_order_item i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); 在不配置绑定表关系时,假设分片键 order_id 将数值 10 路由至第 0 片,将数值 11 路由至第 1 片,那 么路由后的 SQL JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); SELECT i.* FROM t_order_0 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); 4.3. 数据分片 27 Apache JOIN t_order_item_0 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); SELECT i.* FROM t_order_1 o JOIN t_order_item_1 i ON o.order_id=i.order_id WHERE o. order_id in (10, 11); 在配置绑定表关系,并且使用 order_id0 码力 | 406 页 | 4.40 MB | 1 年前3
共 427 条
- 1
- 2
- 3
- 4
- 5
- 6
- 43













