Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
srvpro
Commits
7a23de70
Commit
7a23de70
authored
Nov 16, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some queries and logs
parent
f8965365
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
7 deletions
+27
-7
data-manager/DataManager.js
data-manager/DataManager.js
+1
-1
data-manager/DataManager.ts
data-manager/DataManager.ts
+1
-1
data-manager/entities/CloudReplay.js
data-manager/entities/CloudReplay.js
+6
-1
data-manager/entities/CloudReplay.ts
data-manager/entities/CloudReplay.ts
+7
-2
data-manager/entities/DuelLog.js
data-manager/entities/DuelLog.js
+6
-1
data-manager/entities/DuelLog.ts
data-manager/entities/DuelLog.ts
+6
-1
No files found.
data-manager/DataManager.js
View file @
7a23de70
...
@@ -54,7 +54,7 @@ class DataManager {
...
@@ -54,7 +54,7 @@ class DataManager {
try
{
try
{
const
replays
=
await
this
.
db
.
createQueryBuilder
(
CloudReplay_1
.
CloudReplay
,
"
replay
"
)
const
replays
=
await
this
.
db
.
createQueryBuilder
(
CloudReplay_1
.
CloudReplay
,
"
replay
"
)
.
where
(
"
exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)
"
,
{
key
})
.
where
(
"
exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)
"
,
{
key
})
.
orderBy
(
"
replay.
date
"
,
"
DESC
"
)
.
orderBy
(
"
replay.
id
"
,
"
DESC
"
)
.
limit
(
10
)
.
limit
(
10
)
.
leftJoinAndSelect
(
"
replay.players
"
,
"
player
"
)
.
leftJoinAndSelect
(
"
replay.players
"
,
"
player
"
)
.
getMany
();
.
getMany
();
...
...
data-manager/DataManager.ts
View file @
7a23de70
...
@@ -75,7 +75,7 @@ export class DataManager {
...
@@ -75,7 +75,7 @@ export class DataManager {
try
{
try
{
const
replays
=
await
this
.
db
.
createQueryBuilder
(
CloudReplay
,
"
replay
"
)
const
replays
=
await
this
.
db
.
createQueryBuilder
(
CloudReplay
,
"
replay
"
)
.
where
(
"
exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)
"
,
{
key
})
.
where
(
"
exists (select id from cloud_replay_player where cloud_replay_player.cloudReplayId = replay.id and cloud_replay_player.key = :key)
"
,
{
key
})
.
orderBy
(
"
replay.
date
"
,
"
DESC
"
)
.
orderBy
(
"
replay.
id
"
,
"
DESC
"
)
.
limit
(
10
)
.
limit
(
10
)
.
leftJoinAndSelect
(
"
replay.players
"
,
"
player
"
)
.
leftJoinAndSelect
(
"
replay.players
"
,
"
player
"
)
.
getMany
();
.
getMany
();
...
...
data-manager/entities/CloudReplay.js
View file @
7a23de70
...
@@ -45,6 +45,7 @@ __decorate([
...
@@ -45,6 +45,7 @@ __decorate([
__metadata
(
"
design:type
"
,
String
)
__metadata
(
"
design:type
"
,
String
)
],
CloudReplay
.
prototype
,
"
data
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
data
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Column
({
type
:
"
datetime
"
}),
typeorm_1
.
Column
({
type
:
"
datetime
"
}),
__metadata
(
"
design:type
"
,
Date
)
__metadata
(
"
design:type
"
,
Date
)
],
CloudReplay
.
prototype
,
"
date
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
date
"
,
void
0
);
...
@@ -53,7 +54,11 @@ __decorate([
...
@@ -53,7 +54,11 @@ __decorate([
__metadata
(
"
design:type
"
,
Array
)
__metadata
(
"
design:type
"
,
Array
)
],
CloudReplay
.
prototype
,
"
players
"
,
void
0
);
],
CloudReplay
.
prototype
,
"
players
"
,
void
0
);
CloudReplay
=
__decorate
([
CloudReplay
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
({
orderBy
:
{
id
:
"
DESC
"
}
})
],
CloudReplay
);
],
CloudReplay
);
exports
.
CloudReplay
=
CloudReplay
;
exports
.
CloudReplay
=
CloudReplay
;
//# sourceMappingURL=CloudReplay.js.map
//# sourceMappingURL=CloudReplay.js.map
\ No newline at end of file
data-manager/entities/CloudReplay.ts
View file @
7a23de70
import
{
Column
,
Entity
,
OneToMany
,
PrimaryColumn
}
from
"
typeorm
"
;
import
{
Column
,
Entity
,
Index
,
OneToMany
,
PrimaryColumn
}
from
"
typeorm
"
;
import
{
CloudReplayPlayer
}
from
"
./CloudReplayPlayer
"
;
import
{
CloudReplayPlayer
}
from
"
./CloudReplayPlayer
"
;
import
_
from
"
underscore
"
;
import
_
from
"
underscore
"
;
import
moment
from
"
moment
"
;
import
moment
from
"
moment
"
;
@
Entity
()
@
Entity
({
orderBy
:
{
id
:
"
DESC
"
}
})
export
class
CloudReplay
{
export
class
CloudReplay
{
@
PrimaryColumn
({
unsigned
:
true
,
type
:
"
bigint
"
})
@
PrimaryColumn
({
unsigned
:
true
,
type
:
"
bigint
"
})
id
:
number
;
id
:
number
;
...
@@ -19,6 +23,7 @@ export class CloudReplay {
...
@@ -19,6 +23,7 @@ export class CloudReplay {
return
Buffer
.
from
(
this
.
data
,
"
base64
"
);
return
Buffer
.
from
(
this
.
data
,
"
base64
"
);
}
}
@
Index
()
@
Column
({
type
:
"
datetime
"
})
@
Column
({
type
:
"
datetime
"
})
date
:
Date
;
date
:
Date
;
...
...
data-manager/entities/DuelLog.js
View file @
7a23de70
...
@@ -50,6 +50,7 @@ __decorate([
...
@@ -50,6 +50,7 @@ __decorate([
__metadata
(
"
design:type
"
,
Number
)
__metadata
(
"
design:type
"
,
Number
)
],
DuelLog
.
prototype
,
"
id
"
,
void
0
);
],
DuelLog
.
prototype
,
"
id
"
,
void
0
);
__decorate
([
__decorate
([
typeorm_1
.
Index
(),
typeorm_1
.
Column
(
"
datetime
"
),
typeorm_1
.
Column
(
"
datetime
"
),
__metadata
(
"
design:type
"
,
Date
)
__metadata
(
"
design:type
"
,
Date
)
],
DuelLog
.
prototype
,
"
time
"
,
void
0
);
],
DuelLog
.
prototype
,
"
time
"
,
void
0
);
...
@@ -83,7 +84,11 @@ __decorate([
...
@@ -83,7 +84,11 @@ __decorate([
__metadata
(
"
design:type
"
,
Array
)
__metadata
(
"
design:type
"
,
Array
)
],
DuelLog
.
prototype
,
"
players
"
,
void
0
);
],
DuelLog
.
prototype
,
"
players
"
,
void
0
);
DuelLog
=
__decorate
([
DuelLog
=
__decorate
([
typeorm_1
.
Entity
()
typeorm_1
.
Entity
({
orderBy
:
{
id
:
"
DESC
"
}
})
],
DuelLog
);
],
DuelLog
);
exports
.
DuelLog
=
DuelLog
;
exports
.
DuelLog
=
DuelLog
;
//# sourceMappingURL=DuelLog.js.map
//# sourceMappingURL=DuelLog.js.map
\ No newline at end of file
data-manager/entities/DuelLog.ts
View file @
7a23de70
...
@@ -3,11 +3,16 @@ import {DuelLogPlayer} from "./DuelLogPlayer";
...
@@ -3,11 +3,16 @@ import {DuelLogPlayer} from "./DuelLogPlayer";
import
moment
from
"
moment
"
;
import
moment
from
"
moment
"
;
import
_
from
"
underscore
"
;
import
_
from
"
underscore
"
;
@
Entity
()
@
Entity
({
orderBy
:
{
id
:
"
DESC
"
}
})
export
class
DuelLog
{
export
class
DuelLog
{
@
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
})
@
PrimaryGeneratedColumn
({
unsigned
:
true
,
type
:
"
bigint
"
})
id
:
number
;
id
:
number
;
@
Index
()
@
Column
(
"
datetime
"
)
@
Column
(
"
datetime
"
)
time
:
Date
;
time
:
Date
;
...
...
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