小编Raj*_*rma的帖子

在 yii2 中将 uuid 分配给模型

有没有办法将数据库函数调用分配给模型属性Yii2

就像是:

$myModel->myAttribute = 'mysql:UUID()';
$myModel->save();
Run Code Online (Sandbox Code Playgroud)

或者,如果我想用保存时填充属性,我该怎么做uuid

php mysql yii2

4
推荐指数
1
解决办法
3473
查看次数

无法访问流 arn:aws:dynamodb:us-east-2:144091332251:table/users/stream/2019-06-05T08:00:51.428

我想在新记录插入dynamodb或现有记录更新后立即触发 lambda 函数。同样,我正在使用 awsdynamodb流功能。我试图这样做,但它使我低于错误。

Cannot access stream arn:aws:dynamodb:us-east-2:144091332251:table/users/stream/2019-06-05T08:00:51.428. Please ensure the role can perform the GetRecords, GetShardIterator, DescribeStream, and ListStreams Actions on your stream in IAM. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: c88c1297-438b-11e1-a338-e57e98788b7c)
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-dynamodb amazon-dynamodb-streams

2
推荐指数
1
解决办法
2088
查看次数

地址已与 redis-server 一起使用

运行 redis 服务器时,它显示地址已在使用 这是堆栈跟踪:

45546:C 12 Jul 2019 10:04:41.888 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
45546:C 12 Jul 2019 10:04:41.888 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=45546, just started
45546:C 12 Jul 2019 10:04:41.888 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
45546:M 12 Jul 2019 10:04:41.889 * Increased maximum number of open files to 10032 (it was originally set to 256).
45546:M 12 Jul 2019 10:04:41.890 # …
Run Code Online (Sandbox Code Playgroud)

terminal redis redis-server server

1
推荐指数
1
解决办法
6553
查看次数

用于创建索引的未知键 [High]

我在弹性搜索中创建了一个索引,看起来像

{"amazingdocs":{"aliases":{},"mappings":{"properties":{"Adj Close":{"type":"text"},"Close":{"type":"text"},"Date":{"type":"text"},"High":{"type":"text"},"Low":{"type":"text"},"Open":{"type":"text"},"Volume":{"type":"text"}}},"settings":{"index":{"creation_date":"1563168811565","number_of_shards":"1","number_of_replicas":"1","uuid":"k2wCARIETvufWmrdkDOtyw","version":{"created":"7020099"},"provided_name":"amazingdocs"}}}}
Run Code Online (Sandbox Code Playgroud)

但是现在当我尝试使用 kibana 在其中插入文档时,出现以下错误

{
  "error": {
    "root_cause": [
      {
        "type": "parse_exception",
        "reason": "unknown key [High] for create index"
      }
    ],
    "type": "parse_exception",
    "reason": "unknown key [High] for create index"
  },
  "status": 400
}
Run Code Online (Sandbox Code Playgroud)

语法,我遵循的是

PUT /amazingdocs/ 
{
    "Date": "1960-10-06",
    "Open": "53.720001",
    "High": "53.720001",
    "Low": "53.720001",
    "Close": "53.720001",
    "Adj Close": "53.720001",
    "Volume": "2510000"
}
Run Code Online (Sandbox Code Playgroud)

此外,当我尝试插入具有类似字段的批量数据时,出现以下错误

"{"took":66336,"errors":true,"items":[{"index":{"_index":"amazingdocs","_type":"_doc","_id":"O7o_9GsBcUaBu1lEWjja","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}}}}
Run Code Online (Sandbox Code Playgroud)

elasticsearch kibana

0
推荐指数
1
解决办法
9999
查看次数