mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: move session sharing and collab rooms into a plugin (B12)
This commit is contained in:
1 parent
791d8656a1
commit
a276f6898c
207 files changed
+35771
-11072
No files matched your search
@@ -104,15 +104,17 @@ export function buildTable(
|
||||
*/
|
||||
export function buildRefTable(
|
||||
name: string,
|
||||
columns: Record<string, "text" | "integer">,
|
||||
columns: Record<string, "text" | "integer" | "boolean">,
|
||||
): unknown {
|
||||
const built: Record<string, unknown> = {};
|
||||
for (const [property, type] of Object.entries(columns)) {
|
||||
const columnSqlName = columnName(property);
|
||||
built[property] =
|
||||
type === "integer"
|
||||
? sqliteInteger(columnSqlName)
|
||||
: sqliteText(columnSqlName);
|
||||
type === "boolean"
|
||||
? sqliteInteger(columnSqlName, { mode: "boolean" })
|
||||
: type === "integer"
|
||||
? sqliteInteger(columnSqlName)
|
||||
: sqliteText(columnSqlName);
|
||||
}
|
||||
return sqliteTable(name, built as never);
|
||||
}
|
||||
Reference in new issue
Block a user