@bigbinary/neeto-database-viewer
TypeScript icon, indicating that this package has built-in type declarations

1.0.18 • Public • Published

Neeto Database Viewer

Common component used by neeto-course-web and neeto-course-site for viewing sqlite databases and running queries on them. Powered by sql.js

Usage

<DatabaseViewer
          dbBinaryContent={dbBinaryContent}
        />

[!NOTE] Please check and install the required peer dependencies

Props:

Prop Type Required Description
dbBinaryContent string Yes Base64 encoded database file content.
shouldRunCode boolean No Set to true to run the query (remember to set it back to false).
query string No Query to be ran.
isExercise boolean No Specify if evaluation is required. (Default : false)
solutionQuery string No The solution query used for evaluation
focusTableBeforeRun string No name of the table which should be focused
focusTableAfterRun string No name of the table which should be focused after running query
checkForViews comma separated string No Views that should be taken into account while evaluation
setDbInstance function No Callback function which provides the db instance created using sql.js .Can be used to export db
onSqlRun function No Callback function which runs after query and evaluation is complete. Provides evaluation result and error message as arguments
showSchemaDataSwitcher boolean No Specify if selector for schama and data needs to be shown
showForeignKeys boolean No If Foreign keys need to be shown

Development setup

Example app is created with vite. Simply run

yarn dev

Readme

Keywords

none

Package Sidebar

Install

npm i @bigbinary/neeto-database-viewer

Weekly Downloads

88

Version

1.0.18

License

none

Unpacked Size

8.49 MB

Total Files

8

Last publish

Collaborators

  • neerajdotname
  • bigbinarybot
  • neetohq