Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
1fdf17b5
Commit
1fdf17b5
authored
Mar 26, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup redis AR
parent
dbf733bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
ActiveQuery.php
extensions/redis/ActiveQuery.php
+1
-1
ActiveRecord.php
extensions/redis/ActiveRecord.php
+3
-3
Connection.php
extensions/redis/Connection.php
+1
-1
No files found.
extensions/redis/ActiveQuery.php
View file @
1fdf17b5
...
@@ -270,7 +270,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
...
@@ -270,7 +270,7 @@ class ActiveQuery extends \yii\base\Component implements ActiveQueryInterface
/**
/**
* Executes a script created by [[LuaScriptBuilder]]
* Executes a script created by [[LuaScriptBuilder]]
* @param Connection
$db the database connection used to execute the query.
* @param Connection
|null
$db the database connection used to execute the query.
* If this parameter is not given, the `db` application component will be used.
* If this parameter is not given, the `db` application component will be used.
* @param string $type the type of the script to generate
* @param string $type the type of the script to generate
* @param string $columnName
* @param string $columnName
...
...
extensions/redis/ActiveRecord.php
View file @
1fdf17b5
...
@@ -175,7 +175,7 @@ class ActiveRecord extends BaseActiveRecord
...
@@ -175,7 +175,7 @@ class ActiveRecord extends BaseActiveRecord
}
}
$db
=
static
::
getDb
();
$db
=
static
::
getDb
();
$n
=
0
;
$n
=
0
;
foreach
(
s
tatic
::
fetchPks
(
$condition
)
as
$pk
)
{
foreach
(
s
elf
::
fetchPks
(
$condition
)
as
$pk
)
{
$newPk
=
$pk
;
$newPk
=
$pk
;
$pk
=
static
::
buildKey
(
$pk
);
$pk
=
static
::
buildKey
(
$pk
);
$key
=
static
::
keyPrefix
()
.
':a:'
.
$pk
;
$key
=
static
::
keyPrefix
()
.
':a:'
.
$pk
;
...
@@ -228,7 +228,7 @@ class ActiveRecord extends BaseActiveRecord
...
@@ -228,7 +228,7 @@ class ActiveRecord extends BaseActiveRecord
}
}
$db
=
static
::
getDb
();
$db
=
static
::
getDb
();
$n
=
0
;
$n
=
0
;
foreach
(
s
tatic
::
fetchPks
(
$condition
)
as
$pk
)
{
foreach
(
s
elf
::
fetchPks
(
$condition
)
as
$pk
)
{
$key
=
static
::
keyPrefix
()
.
':a:'
.
static
::
buildKey
(
$pk
);
$key
=
static
::
keyPrefix
()
.
':a:'
.
static
::
buildKey
(
$pk
);
foreach
(
$counters
as
$attribute
=>
$value
)
{
foreach
(
$counters
as
$attribute
=>
$value
)
{
$db
->
executeCommand
(
'HINCRBY'
,
[
$key
,
$attribute
,
$value
]);
$db
->
executeCommand
(
'HINCRBY'
,
[
$key
,
$attribute
,
$value
]);
...
@@ -257,7 +257,7 @@ class ActiveRecord extends BaseActiveRecord
...
@@ -257,7 +257,7 @@ class ActiveRecord extends BaseActiveRecord
{
{
$db
=
static
::
getDb
();
$db
=
static
::
getDb
();
$attributeKeys
=
[];
$attributeKeys
=
[];
$pks
=
s
tatic
::
fetchPks
(
$condition
);
$pks
=
s
elf
::
fetchPks
(
$condition
);
$db
->
executeCommand
(
'MULTI'
);
$db
->
executeCommand
(
'MULTI'
);
foreach
(
$pks
as
$pk
)
{
foreach
(
$pks
as
$pk
)
{
$pk
=
static
::
buildKey
(
$pk
);
$pk
=
static
::
buildKey
(
$pk
);
...
...
extensions/redis/Connection.php
View file @
1fdf17b5
...
@@ -65,7 +65,6 @@ class Connection extends Component
...
@@ -65,7 +65,6 @@ class Connection extends Component
* @var float timeout to use for redis socket when reading and writing data. If not set the php default value will be used.
* @var float timeout to use for redis socket when reading and writing data. If not set the php default value will be used.
*/
*/
public
$dataTimeout
=
null
;
public
$dataTimeout
=
null
;
/**
/**
* @var array List of available redis commands http://redis.io/commands
* @var array List of available redis commands http://redis.io/commands
*/
*/
...
@@ -215,6 +214,7 @@ class Connection extends Component
...
@@ -215,6 +214,7 @@ class Connection extends Component
*/
*/
private
$_socket
;
private
$_socket
;
/**
/**
* Closes the connection when this component is being serialized.
* Closes the connection when this component is being serialized.
* @return array
* @return array
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment