0

I'm trying to write a user-defined function within SQLiteStudio (v3.1.1). This function needs to decode a field stored in base64.

I think I can achieve what I want to using the QByteArray class from Qt Core like so:

QByteArray text = QByteArray::fromBase64(base64EncodedString);
return text.data();

But how can I include/import the QByteArray class, so I can access it's methods inside my user-defined function? Is this even possible within SQLiteStudio?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
  • I'm not sure if it is possible in SQLiteStudio, but is there a reason why you can't use SQLS' own base64_decode(arg) function? – Tim Smit Mar 08 '18 at 07:58
  • @TimSmit Doh! Thanks, I should have RTFM! I'd done some googling, but hadn't seen that it was built-in! If you make your comment an answer, I'll accept it. Maybe include a link to the [sqlitestudio user-manual](https://github.com/pawelsalawa/sqlitestudio/wiki/User_Manual) – ConnectSaucer Mar 09 '18 at 00:29
  • I also didn't find it that easily but couldn't imagine it not existing, so I checked more :) Would appreciate if you could accept, thanks! – Tim Smit Mar 14 '18 at 13:06

1 Answers1

0

I'm not sure if it is possible in SQLiteStudio, but you should be able to use SQLS' own base64_decode(arg) function.

Tim Smit
  • 155
  • 7