[DiscordArchive] DB question: Whats up with the `vw_` prefixed tables in the world db. I haven't found any references
[DiscordArchive] DB question: Whats up with the `vw_` prefixed tables in the world db. I haven't found any references
Archived author: jackpoz • Posted: 2023-07-13T22:16:48.265000+00:00
Original source
A view is a cached select statement, it doesn't store data
Archived author: jackpoz • Posted: 2023-07-13T22:16:53.898000+00:00
Original source
Check https://github.com/TrinityCore/TrinityCo...fa3011c5dc
[Embed: DB/Misc: Add new View for RBAC · TrinityCore/TrinityCore@46bab72]
https://github.com/TrinityCore/TrinityCo...fa3011c5dc
Archived author: jackpoz • Posted: 2023-07-13T22:17:23.389000+00:00
Original source
Or https://github.com/TrinityCore/TrinityCo...0_auth.sql
[Embed: TrinityCore/sql/updates/auth/3.3.5/2021_06_20_00_auth.sql at 46bab7...]
TrinityCore Open Source MMO Framework (master = 10.1.0.50000, 3.3.5 = 3.3.5a.12340) - TrinityCore/TrinityCore
https://github.com/TrinityCore/TrinityCo...0_auth.sql
Archived author: jackpoz • Posted: 2023-07-13T22:17:33.935000+00:00
Original source
That's how a view is defined
Archived author: jackpoz • Posted: 2023-07-13T22:17:55.266000+00:00
Original source
Then as a user you select on the view, like if it was a table
Archived author: jackpoz • Posted: 2023-07-13T22:18:27.232000+00:00
Original source
And mysql runs the select statement defined by the view, with all the joins hidden from the user
Archived author: jackpoz • Posted: 2023-07-13T22:19:04.935000+00:00
Original source
Which for rbac means users don't need to know how rbac tables are linked together, they can just use the view
Archived author: jackpoz • Posted: 2023-07-13T22:19:21.978000+00:00
Original source
You don't update data from a view
Archived author: jackpoz • Posted: 2023-07-13T22:19:37.255000+00:00
Original source
You don't insert data into a view
Archived author: Sarjuuk • Posted: 2023-07-13T22:31:08.732000+00:00
Original source
https://paste2.org/2HDc1Cg1 jfc