feat: mysql driver working, tests passing.

This commit is contained in:
2024-07-11 12:25:02 +02:00
parent 024eb61a41
commit d387b1cda2
8 changed files with 281 additions and 203 deletions

View File

@@ -95,7 +95,7 @@ export const DataTable = ({
</div>
);
},
sortable: true,
enableSorting: true,
cell: ({ row }) => {
const value = row.getValue(column_name) as any;
let finalValue = value;

View File

@@ -23,7 +23,13 @@ declare module "@tanstack/react-router" {
}
}
const queryClient = new QueryClient();
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
},
},
});
// Render the app
const rootElement = document.getElementById("root");

View File

@@ -29,6 +29,7 @@ function TableView() {
return (
<div className="p-3 h-layout w-layout">
<DataTable
key={tableName}
dbName={dbName}
tableName={tableName}
pageSize={pageSize}

View File

@@ -80,10 +80,12 @@ const createColumns = (dbName: string) => {
columnHelper.accessor("primary_key", {
header: "Primary key",
enableSorting: false,
}),
columnHelper.accessor("indexes", {
header: "Indexes",
enableSorting: false,
cell: (props) => {
const indexes = props.getValue();
if (!indexes) return null;