File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public function test(){
29
29
$ ydb = new Ydb ($ config );
30
30
$ table = $ ydb ->table ();
31
31
32
- $ session = $ table ->session ();
32
+ $ session = $ table ->createSession ();
33
33
34
34
$ prepared_query = $ ydb ->table ()->session ()->prepare ('
35
35
declare $pk as Int64;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public function test(){
70
70
];
71
71
$ ydb = new Ydb ($ config );
72
72
$ table = $ ydb ->table ();
73
- $ session = $ table ->session ();
73
+ $ session = $ table ->createSession ();
74
74
$ token = MetaGetter::getMeta ($ session )["x-ydb-auth-ticket " ][0 ];
75
75
self ::assertEquals (
76
76
1 ,
Original file line number Diff line number Diff line change 4
4
5
5
use PHPUnit \Framework \TestCase ;
6
6
use YdbPlatform \Ydb \Auth \Implement \AnonymousAuthentication ;
7
+ use YdbPlatform \Ydb \Table ;
7
8
use YdbPlatform \Ydb \Ydb ;
8
9
9
10
class SessionManager extends \YdbPlatform \Ydb \Session{
@@ -39,14 +40,15 @@ public function test(){
39
40
];
40
41
$ ydb = new Ydb ($ config );
41
42
$ table = $ ydb ->table ();
42
- $ session = $ table ->session ();
43
+ $ session = $ table ->createSession ();
43
44
$ oldSessionId = SessionManager::getSessionId ($ session );
44
45
$ session ->delete ();
45
- $ session = $ table ->session ();
46
+ $ session = $ table ->createSession ();
46
47
SessionManager::setSessionId ($ session ,$ oldSessionId );
48
+ $ tres = $ session ->query ('select 1 as res ' )->rows ()[0 ]['res ' ];
47
49
self ::assertEquals (
48
50
1 ,
49
- $ session -> query ( ' select 1 as res ' )-> rows ()[ 0 ][ ' res ' ]
51
+ $ tres
50
52
);
51
53
}
52
54
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ private function getYdbResult(array $config) : array
38
38
$ ydb = new Ydb ($ config );
39
39
$ table = $ ydb ->table ();
40
40
41
- $ session = $ table ->session ();
41
+ $ session = $ table ->createSession ();
42
42
43
43
$ session ->createTable (
44
44
'episodes ' ,
You can’t perform that action at this time.
0 commit comments