knightnine/manordb

Open Source Json Database Manager Made in WinForms that copies CastleDB's UI structure

This Database Manager also has features which are unique to it for the purpose of further automating database management, features like: adding additional restrictions to...

Open Source Json Database Manager Made in WinForms that copies CastleDB's UI structure

Open Source Json Database Manager Made in WinForms that copies CastleDB's UI structure. This Database Manager also has features which are unique to it for the purpose of further automating database management, features like: adding additional restrictions to how data can be entered, automatically constructed tables defined via "table scripts", and referencing data from non-database files via regex.

What it looks like :

Dark Mode (Default)

Light Mode (change "defaultTheme" string in ColorThemes.cs to "Light" if you want this, but it's a bit broken)

Q: Why did I create this when CastleDB already exists?

A: Because CastleDB has/had bugs that creep in when the database reaches a certain level of complexity which made the 3000 line json file I had unreadable at seemingly random, happened 3 times before I decided not to stick around and find out what the exact issue was and just make my own DB manager that actually works. And so I won't have to sift through 3000 lines of json script to fix the issue as there is no indication of what line the read error occurred at.

The game I am working on relies on complex repeating data structures to define its entities therefore I find that this Database manager would be particularly useful to me.


Goals/Nice-to-Haves:

There are some features that should be added beyond basic functionality but my attention is needed elsewhere. Here is what MDB is lacking in order of most prioritized to least:

  • ability to change columns linked to a `Auto Table Constructor Script Receiver` column without having to delete and re-add the column (thus losing data)
  • hovering over the table tabs should allow you to scroll through them with the scroll wheel
  • Column Type Icons (to show the type of each column)
  • increase the visibility of selected bool cells (they are somewhat hard to destinguish from unselected bool cells)
  • make the row being hovered over become more visible
  • Editable "on Mouse Hover" Column Descriptions + text editor for text cells
  • "Table Directory" column type that constructs and stores a string array of the directory in another table's structure, this would resolve the typos that could arise from writing these directories manually.
  • Key Shortcuts
  • Image Columns
  • File Directory Primary Key List Table Type (a table that refrences a file directory and generates a table with the file names as row data for a Primary Key column.)
  • Undo/Redo
  • an option to expand all rows so that text is readable
  • Normalized Numeric Column (all values are restricted to total 1 across all rows in the same table/sub-table)
  • color coding tables by their depth
  • A "Foreign Key Refrence Primary Key" column (to base a table around foreign keys that can't have duplicate refrences)
  • A "force adjecent cell to value when cell is filled" setting, similar to the feature that disallows two cells from being filled at the same time, except instead of disabling the other cell entirely, the cell is set to a specific value and becomes read only.
  • Table Shifting (re-ordering of Tables)
  • Further Organization of Code (in progress)
  • Detailed Commentation (in progress)
  • Export to Index Removal (removal of indexes that store the order of rows in the dictionary and replacing them with that row's primary key, in order to further simplify data)
  • Separators (equivalent to CDB's "separator")
  • Column Input Limiter (An option to limit the number of rows that can be filled within a certain column before the rest become disabled)

Documentation:

Check out the wiki for more info!
Versions

Quick list of the latest released versions

v1.29.49-beta - Jul 06, 2022

  • Fixed unhandled exception if you only add two data entries to a column that requires three in an Auto Table Constructor Script.

v1.29.48-beta - Mar 14, 2022

  • Fixed issue caused by opening a file with MDB where the config file is potentially saved before loading the config file's stored data, and thus resetting all saved script prefabs.

v1.29.47-beta - Feb 26, 2022

  • Fixed crash when adding bool columns to a table with existing rows due to running UpdateReceiverCellUnfulfilledDependencyState() on the newly added cells of the column, which shouldn't happen.

v1.29.46-beta - Feb 24, 2022

  • fixed crash when changing the name of a column within a table constructor script via the "Update Regex Reference Tables Button" while the script receiver cell using the newly altered script is still in view.

v1.29.45-beta - Feb 23, 2022

Additions:

  • Added a button in the top menu bar that updates all regex reference tables. No longer will you need to to close and re-open MDB to refresh your Regex Reference Tables.

v1.28.45-beta-a - Feb 21, 2022

  • fixed button cell subtable display text not updating when clicking off to another button cell in the same row.

v1.28.45-beta - Feb 20, 2022

  • Fixed crash caused by v1.28.43-beta update due to AddColumn() trying to set newly added SubTable and Receiver column cell values to display "empty" within subtables that aren't open.

v1.28.44-beta-a - Feb 18, 2022

  • newly added rows with subtable and script receiver cells now display initial "empty" text instead of being blank

v1.28.44-beta - Feb 18, 2022

  • Fixed crash within ValidateScript() due to script prefabs being loaded on null scripts.

v1.28.43-beta - Feb 16, 2022

Additions:

  • Under the "Script Settings" menu bar item, you'll find "Set Script Column Type Duplicates" which changes the number of duplicate Auto Table Constructor Script and Auto Table Constructor Script Receiver column pairs that are able to be defined. These column type duplicates are indexed starting at 1. Receiver columns only speak to script columns of the same duplicate index; this way you can have multiple parallel scripts retrieved from a single FKey column by linking multiple receiver columns of different duplicate indexes to that column.

    • the "Regex Reference Table Constructor Editor" prompt now allows you to add multiple Auto Table Constructor Script columns, with each column after the first being an indexed column type.

    • Auto Table Constructor Script can also construct duplicate Auto Table Constructor Script Receiver column types by just adding the index after the column type shorthand (e.g: "A1","A2","A3",... up to the Script Column Type Duplicates value defined in the Script Settings)

Polish:

  • If an Auto Table Constructor Script Receiver column cell has no adjacent linked column cells filled, its text will be greyed out to show that the cell has an unfulfilled dependency.
  • Subtable and Script Receiver columns will now display "empty" upon initial column creation instead of being blank.

Changes:

  • Script Prefab Editor has been moved to the "Script Settings" menu bar item.

v1.27.43-beta - Feb 12, 2022

Thought about a few things I wanted to restructure to use the Auto Table Constructor Script Receiver and here are the additions I needed to execute upon that:

Additions:

  • Column Disabler Array support for Auto Table Constructor Scripts.

(decided to use the column names directly for this design since using something like column indexes to define these arrays might get confusing if you decide to restructure the column order or remove any columns)

  • Custom Auto Table Script Prefabs: if you have a lot of auto table constructor scripts that follow the same format, you can now define "Script Prefabs" which look something like this when implemented into a script <col1>:T, (X), <col3>:T where (X) is will be swaped out of the script with whatever string that is defined by the X key before the script is read. prefabs

(Prefab data is stored under "C:\Users\USERNAME\AppData\Local\MDB......")

Polish:

  • Extended the character length of cell tooltip text (the text that displays upon hovering over cells), now the first few rows of subtable data and long strings in text cells should be entirely visible.
  • extended the width of combo-box cell dropdowns to fit longer strings, they still aren't perfect if you have a long item name like CompareRelevantWatchedKeyDirectoryArraysAndCreateNewPassiveEffectOfValueToAffectedByDifferenceBetweenFirstAndAllOtherValuesTotaled but it should work well enough to see most of it.

Bugfixes:

  • Fixed int values being loaded in as long instead of int which caused some issues with Script Constructed Int Columns having their data wiped due to being an invalid type when opening script constructed tables containing them.

  • Might've fixed a crash when removing the last row from a subtable that exists within a script constructed table but never tested it, just saw that the code wasn't made to accommodate for that issue.

v1.25.41-beta - Feb 07, 2022

  • You can now open a file with the MDB executable and the file will load upon startup. (You should set MDB as the default application to open .mdb files with)
  • the MDB icon is now set as the MDB executable icon.

v1.24.41-beta - Feb 03, 2022

  • fixed "no linked FKey columns have data selected" error incorrectly displaying when the linked columns are filled but just have empty scripts.
  • fixed script merging trying to merge null scripts and crashing (which would happen when opening a table/subtable with a reference column that references a null script). (this issue didn't apply to empty scripts contained in Regex Reference Tables, which I source almost all my script columns from, so I didn't notice this pretty big issue till now)

v1.24.39-beta - Feb 02, 2022

  • The Auto Table Constructor Script Receiver Column will now update its linked column data to name changes in linked columns instead of crashing.

v1.24.38-beta - Feb 01, 2022

Additions:

  • Auto Table Constructor Script Receiver Column can now be linked to multiple Foreign Key Reference Columns at once upon creation, the fetched table constructor scripts are merged together if multiple linked columns are filled. (same applies to Auto Table Constructor Script. You can now define multiple linked columns in a script by just adding another column name next to the last, like so: <linkedCol1><linkedCol2>)

Bugfixes:

  • fixed Auto Table Constructor Script Receiver linked column data not being removed upon creating an invalid receiver column
  • fixed an issue with leaving Regex Reference Table column structure data unconstructed when updating the table (upon loading an mdb file) which causes row data to be added to columns that don't exist. Now the regex tables will fully construct when updating.
  • fixed crash when closing the "Create Auto Table Constructor Script Receiver" window.

v1.23.35-beta - Jan 30, 2022

While I was using the database I've decided to add a few minor improvements and found some bugs to fix.

Additions:

  • When changing the name of a column or table, the name being changed appears as the initial text within the textbox.
  • Upon loading an .mdb file, all File Regex Reference Tables update to changes in referenced file(s) data.

Bugfixes:

  • Folder Select button within the Regex Reference Table Constructor Editor window now throws an error if there's no selected .mdb file directory active to build a relative directory from.
  • fixed constructorDataColumnOrder within RegexRefrenceTableConstructorData not being converted from json.
  • fixed crash when changing table bookmark color from one color to another
  • fixed file appending & added prompt to leave or overwrite duplicate tables within the appended file

v1.21.32-beta - Jan 27, 2022

okay, okay this should have everything I need. Probably no more additions after this for a while.

Additions:

  • Added A Folder select button for the Regex Reference Table Constructor Editor window, which allows referencing text from multiple files within the same folder.
  • Added the "Auto Table Constructor Script Receiver" column type to Auto Table Constructor Script, It is defined like so: <column_name>:A:<linked_foreign_key_column_at_same_table_level> Here I'm linking to the same table script recursively: AutoTableConstructorRecursion
  • Added the "Parent Subtable Foreign Key Refrence" column type to Auto Table Constructor Script, It is defined like so: <column_name>:PF:<outward_directory> and here's a description of how it works:

Bugfixes:

  • fixed crash when deleting a foreign key reference column.

v1.18.31-beta - Jan 19, 2022

  • fixed crash related to Bookmark data not being reset when refreshing the table tabs upon loading or appending a table.
  • fixed "add row" buttons not being re-enabled when removing single row restriction
  • fixed "remove single row restriction" option being displayed incorrectly as "Apply SubTable Single Row Restriction"

1.18.28-beta - Jan 18, 2022

Merry... January, As my project is reaching a phase where I need to write more entries into my database, I require a number of new tools so that it's less mind-numbing to develop. I also threw in a few extra features to knock them off the list:

Features:

  • A New, better looking, Custom Tab Control.

  • Tab Color "Bookmarking" (you can color Tabs if you have a lot of them like me. it makes it easier to navigate through your tables) (this option is within the tab's right click dropdown menu)

  • New Integer Column Type

  • Convert Numeric Columns To Integer Columns and vice versa (so you can more easily integrate this new Column Type)

  • New "Duplicate Row" Function

  • Option to restrict SubTable Column's tables to a single row. (this option is within the SubTable column's right click dropdown menu)

  • New "Table Constructor Script" and "Table Constructor Script Receiver" column types, one column stores a script that is referenced by the other column to construct a subtable with read-only columns: Script and Receiver Here's a Rundown on how to use this script:

  • New "Regex Constructor Tables" which are read-only tables that are constructed from another file. this can be used to construct a table straight from the file the table is referencing (I am using this to automatically construct tables that exist to reference modular functions from my code) though I don't doubt there to be other creative uses for this functionality. (this alternative table type is accessible when creating a new table) Constructor Table

Bugfixes:

  • Fixed not being able to navigate through subtables and subtable text cells with arrow keys. (by some miracle I found a fix online)
  • Fixed existing invalid columns not loading into the table which made them unremovable.

There's a lot of new features in this update so there may be some bug fixes along the way. I'll also be updating the README soon to show these new additions.

1.10.26-beta - Jun 02, 2021

  • renaming columns that are attached by an adjacent column disabler array now works and doesn't crash.

1.10.25-beta - May 30, 2021

  • renaming subtable columns now works properly (the data directories within the subtable column wouldn't be named properly and MDB would thus crash if you opened a subtable within a subtable column you renamed) Also fixed a related issue with open subtables not being renamed properly as well.

1.10.24-beta - Feb 25, 2021

Since the last release:

  • Fixed Bool Cells not loading correctly (they were always displaying true despite being stored as false within data, not sure how i messed that up)
  • Fixed not being able to highlight text via the cursor within a text cell.

v1.10.22-beta - Feb 17, 2021

Fixes:

  • replaced the panel scroll bar with an external scroll bar, instead of panel content scrolling through the in-built Autoscroll feature, the panel location is moved instead. There were way too many issues with the in-built panel scroll bar, the scroll value kept resetting to 0 whenever anything in the panel was touched (which is why the window would sometimes look as if it was flickering as i was storing and resetting the scroll value whenever this would happen) and in certain cases the reset was unavoidable. tldr: there are no longer and will never be any issues with the scroll bar from now on.

  • replaced the subtable menu strip with two buttons stacked on top of each other so that it no longer partially covers the first column header.

Additions:

  • Dark mode so your retinas can remain intact while using MDB. (it is set to "Dark" by default, change it in the ColorThemes.cs file if you want to activate light mode and commit heresy) note: a lot of winforms controls don't have editable colors so i had to make some aesthetic compromises if i didn't want to create entirely new custom controls.
  • Text within subtable buttons displays first 5 rows of surface data and the text is now colored blue to show that it isn't directly editable text.

Refactoring:

  • Database Functions are separated into categories and are easier to navigate.

v1.8.20-beta - Feb 11, 2021

Fixes:

  • You can now copy text from sub-table text cells without issue. (figured out that leaving the cells in other datagridviews selected causes an issue where cell content isn't prioritized before cells you've selected in other tables)
  • Hovering off to another cell will no longer take you out of the cell you were editing, so it's less finicky overall. The mouse needs to enter a different datagridview entirely before focus is lost on the cell you're editing.

v1.8.18-beta - Jan 24, 2021

  • fixed disabled subtable buttons not appearing disabled after selecting an adjacent button of the same row.
  • fixed crash due to the loadingTable bool that disables certain events prematurely being set to false

v1.8.16-beta - Oct 18, 2020

Features:

Was putting these features off because they are a pain to implement

  • added Table Renaming (upon right clicking a tab) rename table

  • added Column Renaming (upon right clicking a column) rename column

Bug fix:

  • fixed crash after selecting a sub-table button that was previously disabled (forgot an else if statement and that setting the cells to being disabled were triggering an event, overwriting the sub-table data with null when it shouldn't) (note: there is still a bug where both cells in a row can disable each other at the same time if you fill in a column that was previously empty then add that same column to a disabler array where the other cell isn't empty. it's likely that it won't ever be encountered and refreshing the table should fix it)

Polish:

  • added an "are you sure" prompt to column and row deletion so that it isn't selected on accident.

v1.6.15-beta - Oct 15, 2020

Polish and Fixes:

  • Duplicate Primary key message box won't show up for null keys.
  • Closing an input window no longer gives an error as if the entry was left blank.
  • Fixed scroll bar resetting upon editing a text cell.
  • Fixed scroll bar resetting upon bringing a DataGridView into focus

Feature:

  • Focus on DataGridViews is now on cell hover for a seamless transition between subtables (you no longer need to click the table to bring it into focus first)

v1.5.12-beta - Sep 24, 2020

  • added a "Parent Subtable Foreign Key Reference" Column in which you are able to reference primary keys from subtables at and above the the column within the same dictionary branch. Would this be used by someone other than me? probably not. But if so you're in luck! Here it is in action: parent table refrence Exhilarating, i know.

  • Fixed crash from selecting a reference column's cell that linked to a non-existent table. Forgot to accommodate for that possibility.

(also added the .vs file on accident, oops)

v1.4.11-beta - Aug 27, 2020

Sifted through the code for my DB manager since i wanted to make a few aspects of my data easier to understand, Then i decided to throw in row insertion while i was re-familiarized with the code.

New features:

  • Adjacent Column Disabler Settings:

    • Say you want each row to represent a single object in a character's default inventory but "items" and "equipment" are derived from distinct tables, So you'll be defining two distinct columns for these foreign key references but you only want one of these columns to be filled out per row and not both. Now you can enforce only one of these columns being filled, while two columns are tied together by their ColumnDisablers array, if either column in a row is filled with data the cell for the other unfilled column in that row will be disabled. This works for all column types ~except bool columns (which do not disable anything as there is no empty state for a check box)~ edit: bool columns now disable when true. disabler
  • Row Insertion (got around to it)

Bug Fixes:

  • Updated old method of parallel "open sub table updating", i.e. when a column is added it needs to be added to all other open subtables at the same 'level' in data (new method should account for all open subtables at that level and not just ones from the same parent table).

  • Fixed the Combobox cells only dropping down when the arrow is selected (now selecting any part of the cell will activate the dropdown)

v1.2.6-beta - May 13, 2020

  • The hide/unhide column button dropdown now uses AutoClose instead of the MouseOut event and just re-opens whenever an item is selected, only issue is that now the menu flickers. (this is to prevent the dropdown menu from being carried over between tables and crashing if an invalid selection is made)
  • Column removal now runs a loop to search for the column name to remove from the table's ColumnOrder list since calling to Remove() the string doesn't work in cases where the data is loaded from a file.
  • ComboBoxCells that are set to a null value will no longer crash the LoadRow function.

Library Stats (Sep 14, 2022)

Subscribers: 1
Stars: 15
Forks: 0
Issues: 0

Json (also known as JSON

NET) is a highly performant JSON serialization library

Json (also known as JSON

NET vs JVM JSON serialization

This is reference benchmark for the fastest JSON serialization libraries in

NET vs JVM JSON serialization

Fake JSON Server

is a Fake REST API that can be used as a Back End for prototyping or as a template for a CRUD Back End

Fake JSON Server
JSON

318

JSON Flat File Data Store

Simple data store that saves the data in JSON format to a single file

JSON Flat File Data Store

A fast JSON (de)serializer, built on Sigil with a number of somewhat crazy optimization tricks

A fast JSON (de)serializer, built on Releases are available on Nuget in addition to this repository

A fast JSON (de)serializer, built on Sigil with a number of somewhat crazy optimization tricks

Kiota Json Serialization Library for dotnet

The Json Serialization Library for dotnet is the dotnet JSON serialization library implementation with System

Kiota Json Serialization Library for dotnet

A JSON serializer/deserializer (with JsonSchema support) library written in pure C#

VJson is a JSON serializer/deserializer (with JsonSchema support) library written in pure C#

A JSON serializer/deserializer (with JsonSchema support) library written in pure C#

FlexBuffers-CSharp

FlexBuffers is JSON comparable binary format with random value access capabilities

FlexBuffers-CSharp
A minimalist JSON library designed to easily encode and decode JSON messages

JSON Document Transfoms

JSON Document Transforms (JDT) library

JSON Document Transfoms