Split mode stats to its own table

This commit is contained in:
Natsu Kagami 2024-08-04 20:14:50 +02:00 committed by Natsu Kagami
parent 69c9c88617
commit e733364d15
15 changed files with 468 additions and 312 deletions

View file

@ -0,0 +1,38 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n username,\n id as \"id: i64\",\n failures as \"failures: u8\"\n FROM osu_users",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "id: i64",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "failures: u8",
"ordinal": 3,
"type_info": "Int64"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
true,
false,
false
]
},
"hash": "246e26a34c042872a77f53a84d62da31db069cced20e3b0f96a40c3c7dd99783"
}

View file

@ -1,74 +0,0 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n username,\n id as \"id: i64\",\n last_update as \"last_update: DateTime\",\n pp_std, pp_taiko, pp_mania, pp_catch,\n failures as \"failures: u8\",\n std_weighted_map_length\n FROM osu_users",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "id: i64",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "last_update: DateTime",
"ordinal": 3,
"type_info": "Datetime"
},
{
"name": "pp_std",
"ordinal": 4,
"type_info": "Float"
},
{
"name": "pp_taiko",
"ordinal": 5,
"type_info": "Float"
},
{
"name": "pp_mania",
"ordinal": 6,
"type_info": "Float"
},
{
"name": "pp_catch",
"ordinal": 7,
"type_info": "Float"
},
{
"name": "failures: u8",
"ordinal": 8,
"type_info": "Int64"
},
{
"name": "std_weighted_map_length",
"ordinal": 9,
"type_info": "Float"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
true,
false,
false,
true,
true,
true,
true,
false,
true
]
},
"hash": "6ef67ca385287a4cef9fdd47bf4258ec9de4802d90dbb2ab48de32c1a4ada601"
}

View file

@ -0,0 +1,38 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n username,\n id as \"id: i64\",\n failures as \"failures: u8\"\n FROM osu_users WHERE id = ?",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "id: i64",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "failures: u8",
"ordinal": 3,
"type_info": "Int64"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
true,
false,
false
]
},
"hash": "9b7788f4d7144fe00f4bc9004c88dc8562ff3d7a931fc3f1dc039cc55fe3195a"
}

View file

@ -1,12 +0,0 @@
{
"db_name": "SQLite",
"query": "INSERT\n INTO osu_users(user_id, username, id, last_update, pp_std, pp_taiko, pp_mania, pp_catch, failures, std_weighted_map_length)\n VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT (user_id) WHERE id = ? DO UPDATE\n SET\n last_update = excluded.last_update,\n username = excluded.username,\n pp_std = excluded.pp_std,\n pp_taiko = excluded.pp_taiko,\n pp_mania = excluded.pp_mania,\n pp_catch = excluded.pp_catch,\n failures = excluded.failures,\n std_weighted_map_length = excluded.std_weighted_map_length\n ",
"describe": {
"columns": [],
"parameters": {
"Right": 11
},
"nullable": []
},
"hash": "a06efa1b12c2c7c9cf5b83bff796c0e59d61596cb609c4bb952edc2d64cec868"
}

View file

@ -0,0 +1,44 @@
{
"db_name": "SQLite",
"query": "SELECT\n mode as \"mode: u8\",\n pp,\n map_length,\n map_age,\n last_update as \"last_update: DateTime\"\n FROM osu_user_mode_stats\n WHERE user_id = ?\n ORDER BY mode ASC",
"describe": {
"columns": [
{
"name": "mode: u8",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "pp",
"ordinal": 1,
"type_info": "Float"
},
{
"name": "map_length",
"ordinal": 2,
"type_info": "Float"
},
{
"name": "map_age",
"ordinal": 3,
"type_info": "Int64"
},
{
"name": "last_update: DateTime",
"ordinal": 4,
"type_info": "Int64"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
false,
false,
false,
false
]
},
"hash": "a247c7a73bdbf1042fdd8363da1f6b51e283c83b1ba7fa17e5cb056b220f7889"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT\n INTO osu_users(user_id, username, id, failures)\n VALUES(?, ?, ?, ?)\n ON CONFLICT (user_id) WHERE id = ? DO UPDATE\n SET\n username = excluded.username,\n failures = excluded.failures\n ",
"describe": {
"columns": [],
"parameters": {
"Right": 5
},
"nullable": []
},
"hash": "a5d8dccaaf80b2673c5c0e689c01a90861788ca84221baaaf19cd159ed3062c9"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "DELETE FROM osu_user_mode_stats WHERE user_id = ?",
"describe": {
"columns": [],
"parameters": {
"Right": 1
},
"nullable": []
},
"hash": "aa6db751abe51922548d6c040d40ef57cae1cf6338523fd2b801b482164d54fa"
}

View file

@ -0,0 +1,38 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n username,\n id as \"id: i64\",\n failures as \"failures: u8\"\n FROM osu_users WHERE user_id = ?",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "id: i64",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "failures: u8",
"ordinal": 3,
"type_info": "Int64"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
true,
false,
false
]
},
"hash": "ae7f57eb92e0bec8439e682ab3ca10732991ffe803d05b09e908ecb4a74c0566"
}

View file

@ -1,74 +0,0 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n username,\n id as \"id: i64\",\n last_update as \"last_update: DateTime\",\n pp_std, pp_taiko, pp_mania, pp_catch,\n failures as \"failures: u8\",\n std_weighted_map_length\n FROM osu_users WHERE id = ?",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "id: i64",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "last_update: DateTime",
"ordinal": 3,
"type_info": "Datetime"
},
{
"name": "pp_std",
"ordinal": 4,
"type_info": "Float"
},
{
"name": "pp_taiko",
"ordinal": 5,
"type_info": "Float"
},
{
"name": "pp_mania",
"ordinal": 6,
"type_info": "Float"
},
{
"name": "pp_catch",
"ordinal": 7,
"type_info": "Float"
},
{
"name": "failures: u8",
"ordinal": 8,
"type_info": "Int64"
},
{
"name": "std_weighted_map_length",
"ordinal": 9,
"type_info": "Float"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
true,
false,
false,
true,
true,
true,
true,
false,
true
]
},
"hash": "b098282e73cc6fd435330f6ecd446b1a1cd2aeb89517b7ee09e7e6f8d6e0cd79"
}

View file

@ -0,0 +1,50 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n mode as \"mode: u8\",\n pp,\n map_length,\n map_age,\n last_update as \"last_update: DateTime\"\n FROM osu_user_mode_stats\n ORDER BY user_id ASC, mode ASC",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "mode: u8",
"ordinal": 1,
"type_info": "Int64"
},
{
"name": "pp",
"ordinal": 2,
"type_info": "Float"
},
{
"name": "map_length",
"ordinal": 3,
"type_info": "Float"
},
{
"name": "map_age",
"ordinal": 4,
"type_info": "Int64"
},
{
"name": "last_update: DateTime",
"ordinal": 5,
"type_info": "Int64"
}
],
"parameters": {
"Right": 0
},
"nullable": [
false,
false,
false,
false,
false,
false
]
},
"hash": "d2c0856276174653a9dd428a2f89e7841b2083ee4b18ea83eedcd46bc4356599"
}

View file

@ -1,74 +0,0 @@
{
"db_name": "SQLite",
"query": "SELECT\n user_id as \"user_id: i64\",\n username,\n id as \"id: i64\",\n last_update as \"last_update: DateTime\",\n pp_std, pp_taiko, pp_mania, pp_catch,\n failures as \"failures: u8\",\n std_weighted_map_length\n FROM osu_users WHERE user_id = ?",
"describe": {
"columns": [
{
"name": "user_id: i64",
"ordinal": 0,
"type_info": "Int64"
},
{
"name": "username",
"ordinal": 1,
"type_info": "Text"
},
{
"name": "id: i64",
"ordinal": 2,
"type_info": "Int64"
},
{
"name": "last_update: DateTime",
"ordinal": 3,
"type_info": "Datetime"
},
{
"name": "pp_std",
"ordinal": 4,
"type_info": "Float"
},
{
"name": "pp_taiko",
"ordinal": 5,
"type_info": "Float"
},
{
"name": "pp_mania",
"ordinal": 6,
"type_info": "Float"
},
{
"name": "pp_catch",
"ordinal": 7,
"type_info": "Float"
},
{
"name": "failures: u8",
"ordinal": 8,
"type_info": "Int64"
},
{
"name": "std_weighted_map_length",
"ordinal": 9,
"type_info": "Float"
}
],
"parameters": {
"Right": 1
},
"nullable": [
false,
true,
false,
false,
true,
true,
true,
true,
false,
true
]
},
"hash": "df0aa5065268e59c68990ab46ab4a90ec3137398e83b3d0c626209306804399a"
}

View file

@ -0,0 +1,12 @@
{
"db_name": "SQLite",
"query": "INSERT INTO osu_user_mode_stats (user_id, mode, pp, map_length, map_age, last_update) VALUES (?, ?, ?, ?, ?, ?)",
"describe": {
"columns": [],
"parameters": {
"Right": 6
},
"nullable": []
},
"hash": "f356ab7ef8b7c320d29ad9cce03f66defcfbe67a7c4ccac16dd41508bc2d829d"
}