Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

649 B
Raw Blame
import type { CellValue } from "@/lib/dataGrid/cellValue";
import type { HBaseCellInput, HBaseValueEncoding } from "@/types/hbase";

export interface HBaseEncodedText {
  value: string;
  encoding: HBaseValueEncoding;
}

export function encodeHBaseTextInput(value: string): HBaseEncodedText {
  return value.startsWith("base64:") ? { value: value.slice(7), encoding: "base64" } : { value, encoding: "utf8" };
}

export function hbaseCellInput(column: string, value: CellValue): HBaseCellInput {
  const encoded = encodeHBaseTextInput(value == null ? "" : String(value));
  return { column, value: encoded.value, valueEncoding: encoded.encoding };
}