Comments (2)
Hello,
It was a bit of a confusing read but If i understand correctly then, yes, I think it should be possible.
I'm not an expert on SQL so I can't give you a definitive answer, however, I can tell you where I'd be looking.
Look into SQL Triggers http://www.sqlitetutorial.net/sqlite-trigger/.
I'm actually not sure of the limitations of SQL triggers but it might be possible to create two new columns in tags_mappings
as you suggested, and then create a trigger to insert or update the text from from tags
and namespaces
into those two columns. I think this is what you want?
As for HP specifically, you could just periodically export the database to a HPDB
file in the settings. This is just a JSON
file containing all the gallery metadata in an easy to read manner. No need to fiddle with SQL.
from happypanda.
Thanks for the response, i'll look into triggers to see if it's the answer i seek.
Sorry for the confusing explanation, it's a bit hard trying to explain that i need the new columns to be filled with the right text values correlated to the IDs in those rows.
Dunno if it makes it a bit easier to understand, or even harder, but here's an example of what i'm trying to accomplish.
In this example, most of the rows contain 22 as namespace id, thus the new column "namespace" takes the data from the namespaces table (where the column shows that 22=artist) and writes "artist" as a result on every row until namespace_id 3 ;
same with the new "tag" table, every id gets the correct text value and is an easier read than having just IDs withouth knowing what they stand for and having to search manually one by one.
Thanks for the help anyway, i'm thankful that happypanda doesn't need this kind of operations to read the contents of its database.
from happypanda.
Related Issues (20)
- Gallery Downloader Python AttributeError HOT 1
- Gallery Downloader "Gallery could not be added!" HOT 1
- Adding network directories HOT 2
- Sort by number of pages
- File location detection. HOT 2
- Include and exclude in metadata search HOT 1
- Metadata not working? HOT 4
- Start over HOT 32
- ImportError: No module named 'PyQt5' on Mac HOT 3
- 'It was too big' failure when import large galleries, and foldernames with " ' "9 HOT 5
- Unable to save to db - table series has no artist column HOT 4
- One last push, can you add JPEG support? HOT 9
- Changing path of monitored folders? HOT 8
- A critical error has been encountered. HOT 12
- How to set which site to check first when auto fetching metadata? HOT 5
- SyntaxError HOT 2
- Critical Error when importing database HOT 4
- Metadata won't work since e-hentai re-modeled their site HOT 2
- Plz archive this HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from happypanda.