Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.
This repository was archived by the owner on Mar 14, 2020. It is now read-only.

Question regarding happypanda.db reading on SQLStudio #190

@UnlimitedArk

Description

@UnlimitedArk

Hi, i'd like to pose a question regarding the happypanda.db, specifically when reading it with sqlite studio ;
i've also tried asking this question elsewhere (like on hydrus, where there's a similar situation), but i can't seem to get an answer on if this operation is even possible.

Basically, in the db, i'm looking at these three tables : namespaces, tags and tags_mappings.
Namespaces has columns for IDs and text values, for example id 4 : artist ; tags table is basically the same, but obviouslly for the subtags, for example id 300:hisasi.
Tags_mappings has 3 columns for IDs (mapping, namespace, tag) ; continuing the example, pairing 350 could be for namespace 4 and tag 300, thus artist:hisasi.
The problem is that this table doesn't list the text values, only the ids, meaning that in order to find what each mapping represented, i'd have to manually search in the previous 2 tables what namespace_id 4 and tag_id 300 stood for.

What i'm asking is : is it possible to add, to the tags_mappings table, the text values that are in the previous tables? Either by adding 2 new columns and fill them with the right values or outright swapping the ids in place for the text.
Unfortunately it's not even a matter of simply copying and pasting all the rows, since there are repeated ids as results of pairings ;
what i need is, for every row that has namespace_id 4, the new column should have "artist" (or instead, swap out the "4" for "artist").

Still, i'm trying to understand if such an operation is even posssible, i've been suggestd the INNER JOIN command, but i can't seem to make it work as the text values are not listed in the query result, and there was no further elaboration.

As to why i need to do this, again it's not specifically related to happypanda (altho it could be useful in the series_tags_map table to see all the tags that each gallery had), it's more of a hydrus problem in a situation where i could only read the database and needed to see some tag pairings to recover lost stuff.
I thought of asking the same thing here too since it could apply just as much.

Thanks for the help regardless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions