Public
Back
Version 56
1/15/2024
/** @jsxImportSource https://esm.sh/preact */
import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
import { render } from "npm:preact-render-to-string";
const input_type = (type, name) => {
switch (type) {
case "INTEGER":
return (
<div className="form-element">
<label for={name}>{name}</label>
<input type="number" name={name} id={name} />
</div>
);
case "TIMESTAMP":
return (
<div className="form-element">
<label for={name}>{name}</label>
<input type="date" name={name} id={name} />
</div>
);
}
return (
<div className="form-element">
<label for={name}>{name}</label>
<input type="text" name={name} id={name} />
</div>
);
};
const getDatabaseStructure = async () => {
let struct = [];
try {
const table = await sqlite.execute("PRAGMA table_info(users);");
const rows = await table.rows;
const row = rows;
const arr = Array.from(row);
kajgod-manage_users.web.val.run
Updated: January 19, 2024