Skip to content

Commit

Permalink
fix batchUpdateIds id is string
Browse files Browse the repository at this point in the history
  • Loading branch information
sakuraovq committed Sep 13, 2020
1 parent 60d48ca commit 5e314e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 152 deletions.
7 changes: 5 additions & 2 deletions src/db/src/Query/Grammar/Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -945,10 +945,13 @@ public function compileBatchUpdateByIds(Builder $query, array $values, string $p

$setStr .= " `$column` = case `$primary` ";
foreach ($values as $row) {
$value = $row[$column];
$value = $row[$column];
$id = $row[$primary];

$rowValue = is_string($value) ? "'$value'" : $value;
$rowId = is_string($id) ? "'$id'" : $id;

$setStr .= " when '$row[$primary]' then $rowValue ";
$setStr .= " when $rowId then $rowValue ";
}
$setStr .= ' end,';
}
Expand Down
150 changes: 0 additions & 150 deletions src/redis/src/Connection/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,156 +155,6 @@
*/
abstract class Connection extends AbstractConnection implements ConnectionInterface
{
/**
* Supported methods
*
* @var array
*/
protected $supportedMethods = [
'append',
'bitcount',
'blpop',
'brpop',
'brpoplpush',
'decr',
'decrby',
'eval',
'evalsha',
'exists',
'geoadd',
'geodist',
'geohash',
'geopos',
'georadius',
'get',
'getbit',
'getoption',
'getrange',
'getset',
'hdel',
'hexists',
'hget',
'hgetall',
'hincrby',
'hincrbyfloat',
'hkeys',
'hlen',
'hmget',
'hmset',
'hset',
'hsetnx',
'hvals',
'hscan',
'incr',
'incrby',
'incrbyfloat',
'info',
'lget',
'linsert',
'lpop',
'lpush',
'lpushx',
'lset',
'mset',
'msetnx',
'persist',
'pexpire',
'pexpireat',
'psetex',
'pttl',
'rpop',
'rpush',
'rpushx',
'rawcommand',
'renamenx',
'restore',
'rpoplpush',
'sadd',
'saddarray',
'sdiff',
'sdiffstore',
'sinter',
'sinterstore',
'smembers',
'smove',
'spop',
'srandmember',
'sunion',
'sunionstore',
'scan',
'script',
'set',
'setbit',
'setrange',
'setex',
'setnx',
'sort',
'sscan',
'strlen',
'ttl',
'type',
'unwatch',
'watch',
'zadd',
'zcard',
'zcount',
'zincrby',
'zlexcount',
'zpopmin',
'zpopmax',
'zrange',
'zrangebylex',
'zrangebyscore',
'zrank',
'zremrangebylex',
'zrevrange',
'zrevrangebylex',
'zrevrangebyscore',
'zrevrank',
'zscore',
'zscan',
'del',
'expire',
'keys',
'llen',
'lindex',
'lrange',
'lrem',
'ltrim',
'mget',
'rename',
'scard',
'sismember',
'srem',
'zrem',
'zremrangebyrank',
'zremrangebyscore',
'zinterstore',
'zunionstore',
'hmset',
'psubscribe',
'multi',
'publish',
'pubsub',
'punsubscribe',
'subscribe',
'unsubscribe',
'expireat',
'xack',
'xadd',
'xclaim',
'xdel',
'xgroup',
'xinfo',
'xlen',
'xpending',
'xrange',
'xread',
'xreadgroup',
'xrevrange',
'xtrim',
];

/**
* @var Redis|RedisCluster
*/
Expand Down

0 comments on commit 5e314e5

Please sign in to comment.