Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Plugin(Extension) Supports, Data Visualization #1198

Open
3 of 14 tasks
imwithye opened this issue Oct 26, 2017 · 6 comments
Open
3 of 14 tasks

Feature Request: Plugin(Extension) Supports, Data Visualization #1198

imwithye opened this issue Oct 26, 2017 · 6 comments
Labels

Comments

@imwithye
Copy link

Details for the issue

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( _version: Windows 10)
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

I have also:

Hi there,

I am writing the issue for requesting a feature in SQLite Browser. I would like to request plugin/extension support in SQLite Browser. I am using SQLite database to store some binary chunk and inside SQLite Browser I notice there are 3 built-in data visualizers(Text, Binary, Image).
Maybe it would be a good idea that we can allow the user to create their own extension so that they are able to get the binary chunk of the cell and display their own result.
This will be good for someone use SQLite database to store a JSON object or even some self-defined binary chunk.
capture
Allow the user to define their own mode.

Thanks!

@justinclift justinclift added the enhancement Feature requests. label Oct 26, 2017
@justinclift
Copy link
Member

Thanks @imwithye. It's a good idea. Not likely to happen in the short or medium term though, unless you happen to have skill in C++ programming (or are willing to learn). 😄

@mgrojo
Copy link
Member

mgrojo commented Dec 5, 2017

@imwithye Take a look at #1173 if you're specifically interested in JSON data visualisation. 😄

@mgrojo
Copy link
Member

mgrojo commented Dec 6, 2017

I was thinking about this enhancement. I believe the best approach for the user is to create an SQLite extension instead of one for ours. That would provide a function that converts the binary chunk to a textual decoding. Ideally the user should be able to choose this new function as a custom display format (see issue #573). But even with our current situation, the user would be able to create a view, which calls the function. Then the binary chunk can be visualized in the Text Cell Editor.

This approach would also work for image visualisations, if that is the kind of data that the display format function returns.

The trickier part of this approach is that if the user edits the textual representation and saves it back to the database, the binary chunk is overwritten with the new text data. This is already happening with multiple display formats, by the way, like the "Hex blob" one. This brings me to think, that what we need is being able to set a counterpart for the display format, that encodes the data back to its original form.

But if we only think in data visualisation, providing an SQLite extension as display format seems better to me, than developing our own visualisation extension framework.

@justinclift
Copy link
Member

... if the user edits the textual representation and saves it back to the database, the binary chunk is overwritten with the new text data. This is already happening with multiple display formats, by the way, like the "Hex blob" one.

Oh, that sounds like a bug. If someone edits a binary call in the hex mode and saves it back, it shouldn't be getting converted to a different data type. Well, not unless the new contents from the user really are a different data type. 😄

@mgrojo
Copy link
Member

mgrojo commented Feb 26, 2019

Quoting @justinclift from #1716 (comment)

Maybe we should start to think about a DB4S extension format that loads SQLite extensions, defines new custom display formats, based on the SQLite extension or not, defines function and help messages for syntax highlighter (for the new functions in the extension) and whatever that makes sense and comes to mind.

Yep, it's a decent idea. Wonder if it's something which could be cross platform?

Guessing it'll probably require compiled code, so whatever we figure out will likely include:

  • Some kind of "metadata" (xml? or json?) which isn't OS-specific

  • Loadable code (architecture specific)

    • .dll for Windows?
    • .dylib for macOS?
    • .so for *nix?

Wonder if it'll need to be compiled for a specific DB4S release? Probably yes, unless we can figure out some abstraction thing... then again I haven't done C++ code in years and barely remember it. This might be a mostly-solved problem already. smile

What I'm thinking could be solved simply by using an XML file. The only compiled part (in a platform specific shared library) would be an optional SQLite extension (like the math extension or the new PR #1716 one).The remaining options in the extension file are possible as data that we can load and use.

For example, our extension file for the math extension would do:

  • Load the extension-functions dynamic library.
  • Add these words as functions for the SQL syntax highlighter: acos, asin, atan, atn2, atan2, acosh, asinh, atanh, difference, degrees, radians, cos, sin, tan, cot, cosh, sinh, tanh, coth, exp, log, log10, power, sign, sqrt, square, ceil, floor, pi. String: replicate, charindex, leftstr, rightstr, ltrim, rtrim, trim, replace, reverse, proper, padl, padr, padc, strfilter. Aggregate: stdev, variance, mode, median, lower_quartile, upper_quartile.
  • Add help messages for the so called Scintilla call tips for those functions.
  • Add appropiate display format templates using some of those functions.

@justinclift
Copy link
Member

Sounds like a good approach, and a good use case for trying things out with. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants