editdb-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.js ADDED
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ env: {
3
+ es2021: true,
4
+ node: true,
5
+ },
6
+ extends: ['eslint:recommended', 'prettier'],
7
+ parserOptions: {
8
+ ecmaVersion: 'latest',
9
+ sourceType: 'module',
10
+ },
11
+ rules: {},
12
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "arrowParens": "always"
6
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # EditDB-CLI
2
+
3
+ | [English](README.md) | [Japanese](README_ja.md) |
4
+
5
+ A CLI tool that allows anyone to easily edit and create SQLite databases.
6
+
7
+ ![demo](assets/demo.gif)
8
+
9
+ ## Key Features
10
+
11
+ - **Interactive UI**: Manage databases, tables, and data through an easy-to-use interactive command line interface.
12
+ - **Safe Operations**: Builds queries with parameterization to protect against SQL injection.
13
+ - **Full Data Management**: Supports creating, reading, updating, and deleting (CRUD) operations for both single and multiple rows.
14
+ - **Schema Alterations**: Add/drop columns and rename tables.
15
+ - **Multi-language Support**: Available in English and Japanese.
16
+
17
+ For a full list of features, please see the [Features Documentation](docs/FEATURES.md).
18
+
19
+ ## Installation
20
+
21
+ Install globally using npm:
22
+ ```bash
23
+ npm install -g editdb-cli
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ Simply run the `editdb` command in your terminal.
29
+ ```bash
30
+ editdb
31
+ ```
32
+ The tool will automatically detect SQLite database files in the current directory.
33
+
34
+ You can also specify a path to a database file:
35
+ ```bash
36
+ editdb ./path/to/your.db
37
+ ```
38
+
39
+ ### Options
40
+ - `--lang [en|ja]`: Specify the display language.
41
+ - `-h`, `--help`: Show the help message.
42
+ - `-v`, `--version`: Show the version number.
43
+
44
+ ---
45
+
46
+ For information on setting up your development environment, please read [CONTRIBUTING_ja.md](docs/CONTRIBUTING.md).
47
+
48
+ ## License
49
+
50
+ This project is licensed under the [MIT License](LICENSE).
package/README_ja.md ADDED
@@ -0,0 +1,50 @@
1
+ # EditDB-CLI
2
+
3
+ | [English](README.md) | [Japanese](README_ja.md) |
4
+
5
+ SQLiteデータベースを誰でも簡単に編集、作成できるCLIツール。
6
+
7
+ ![demo](assets/demo.gif)
8
+
9
+ ## 主な機能
10
+
11
+ - **対話型UI**: 使いやすい対話型のコマンドラインインターフェースを通じて、データベース、テーブル、データを管理します。
12
+ - **安全な操作**: クエリはパラメータ化によって構築され、SQLインジェクションから保護します。
13
+ - **完全なデータ管理**: 単一行および複数行の作成、読み取り、更新、削除(CRUD)操作をサポートします。
14
+ - **スキーマ変更**: カラムの追加/削除、テーブルのリネームが可能です。
15
+ - **多言語サポート**: 日本語と英語に対応しています。
16
+
17
+ 全機能のリストは[機能一覧ドキュメント](docs/FEATURES_ja.md)をご覧ください。
18
+
19
+ ## インストール
20
+
21
+ npmを使ってグローバルにインストールします:
22
+ ```bash
23
+ npm install -g editdb-cli
24
+ ```
25
+
26
+ ## 使い方
27
+
28
+ ターミナルで`editdb`コマンドを実行するだけです。
29
+ ```bash
30
+ editdb
31
+ ```
32
+ カレントディレクトリにあるSQLiteデータベースファイルが自動で検出されます。
33
+
34
+ データベースファイルへのパスを直接指定することもできます:
35
+ ```bash
36
+ editdb ./path/to/your.db
37
+ ```
38
+
39
+ ### オプション
40
+ - `--lang [en|ja]`: 表示言語を指定します。
41
+ - `-h`, `--help`: ヘルプメッセージを表示します。
42
+ - `-v`, `--version`: バージョン番号を表示します。
43
+
44
+ ---
45
+
46
+ 開発環境のセットアップついては、[CONTRIBUTING_ja.md](docs/CONTRIBUTING_ja.md)をお読みください。
47
+
48
+ ## ライセンス
49
+
50
+ このプロジェクトは[MITライセンス](LICENSE)の下で公開されています。
@@ -0,0 +1,11 @@
1
+ Usage: editdb [db_file_path]
2
+
3
+ Options:
4
+ -l, --lang [lang] Set the language (e.g., "en" or "ja")
5
+ -h, --help Display this help message
6
+ -v, --version Display version information
7
+
8
+ Repository: ${meta.repositoryURL}
9
+
10
+ A CLI tool that allows anyone to easily edit and create SQLite databases.
11
+ If no path is specified, it will look for databases in the current directory.
@@ -0,0 +1,11 @@
1
+ Usage: editdb [db_file_path]
2
+
3
+ Options:
4
+ -l, --lang [lang] 言語を設定します (例: "en" または "ja")
5
+ -h, --help このヘルプメッセージを表示
6
+ -v, --version バージョン情報を表示
7
+
8
+ Repository: ${meta.repositoryURL}
9
+
10
+ SQLiteデータベースを誰でも簡単に編集、作成できるCLIツール。
11
+ パスを指定しない場合、カレントディレクトリからデータベースを選択します。
package/bin/editdb.js ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { main } from '../src/index.js';
3
+
4
+ main().catch((err) => {
5
+ console.error('\nAn unexpected error has occurred:', err);
6
+ process.exit(1);
7
+ });
package/counts.db ADDED
Binary file
@@ -0,0 +1,38 @@
1
+ ## Development Setup
2
+
3
+ 1. **Clone the repository:**
4
+ ```bash
5
+ git clone https://github.com/yh2237/EditDB-CLI.git
6
+ cd EditDB-CLI
7
+ ```
8
+
9
+ 2. **Install dependencies:**
10
+ ```bash
11
+ npm install
12
+ ```
13
+
14
+ 3. **Link the package for local development:**
15
+ This will create a global `editdb` command that points to your local source code.
16
+ ```bash
17
+ npm link
18
+ ```
19
+ Now you can run `editdb` anywhere in your terminal to test your local changes.
20
+
21
+ ## Scripts
22
+
23
+ - **Run tests:**
24
+ ```bash
25
+ npm test
26
+ ```
27
+
28
+ - **Lint the code:**
29
+ Check for code quality and style issues.
30
+ ```bash
31
+ npm run lint
32
+ ```
33
+
34
+ - **Format the code:**
35
+ Automatically format the code using Prettier.
36
+ ```bash
37
+ npm run format
38
+ ```
@@ -0,0 +1,38 @@
1
+ ## 開発環境のセットアップ
2
+
3
+ 1. **リポジトリをクローンします:**
4
+ ```bash
5
+ git clone https://github.com/yh2237/EditDB-CLI.git
6
+ cd EditDB-CLI
7
+ ```
8
+
9
+ 2. **依存パッケージをインストールします:**
10
+ ```bash
11
+ npm install
12
+ ```
13
+
14
+ 3. **ローカル開発用にパッケージをリンクします:**
15
+ これにより、ローカルのソースコードを指すグローバルな`editdb`コマンドが作成されます。
16
+ ```bash
17
+ npm link
18
+ ```
19
+ これで、ターミナルのどこからでも`editdb`コマンドを実行して、ローカルでの変更をテストできます。
20
+
21
+ ## スクリプト
22
+
23
+ - **テストの実行:**
24
+ ```bash
25
+ npm test
26
+ ```
27
+
28
+ - **コードのリンティング:**
29
+ コードの品質とスタイルに関する問題をチェックします。
30
+ ```bash
31
+ npm run lint
32
+ ```
33
+
34
+ - **コードのフォーマット:**
35
+ Prettierを使ってコードを自動整形します。
36
+ ```bash
37
+ npm run format
38
+ ```
@@ -0,0 +1,35 @@
1
+ # Features
2
+
3
+ `editdb-cli` is a powerful CLI tool that provides a comprehensive interactive interface for managing SQLite databases.
4
+
5
+ ### Database Management
6
+ - **Interactive Database Selection**: Automatically detects `.db` and `.sqlite` files in the current directory and allows you to choose one.
7
+ - **Create New Database**: You can create a new database file directly from the tool.
8
+
9
+ ### Table Management
10
+ - **Interactive Table Selection**: Displays a list of existing tables to choose from.
11
+ - **Create New Table**: An interactive prompt guides you through defining columns, data types, primary keys, and constraints to create a new table.
12
+ - **Alter Table**:
13
+ - Add new columns.
14
+ - Drop existing columns (with a compatibility-safe method).
15
+ - Rename tables.
16
+ - **View Schema**: Display the schema of a selected table at any time.
17
+
18
+ ### Row/Data Management
19
+ - **Paginated Data Browser**: View table data in a paginated list, making it easy to navigate through large datasets.
20
+ - **Single Row Operations**:
21
+ - Select a row to view its details.
22
+ - Update specific columns of a selected row.
23
+ - Delete a selected row.
24
+ - **Multiple Row Operations**:
25
+ - **Safe WHERE Clause Builder**: Interactively build `WHERE` clauses by selecting columns, operators, and values, preventing SQL injection.
26
+ - Update all rows matching the built `WHERE` clause.
27
+ - Delete all rows matching the built `WHERE` clause.
28
+ - **Insert New Row**: An interactive prompt helps you insert a new row by asking for a value for each column.
29
+
30
+ ### Querying
31
+ - **Custom `SELECT` Query**: Execute custom, read-only `SELECT` queries to perform complex data retrieval.
32
+
33
+ ### Other
34
+ - **Internationalization (i18n)**: Supports multiple languages (English and Japanese), automatically detecting your system's language preference.
35
+ - **Helpful Logging**: Provides clear, color-coded feedback for successes, warnings, and errors.
@@ -0,0 +1,35 @@
1
+ # 機能一覧
2
+
3
+ `editdb-cli`は、SQLiteデータベースを管理するための包括的な対話型インターフェースを提供する、強力なCLIツールです。
4
+
5
+ ### データベース管理
6
+ - **対話的なデータベース選択**: カレントディレクトリにある`.db`や`.sqlite`ファイルを自動検出し、リストから選択できます。
7
+ - **新規データベース作成**: ツールから直接新しいデータベースファイルを作成できます。
8
+
9
+ ### テーブル管理
10
+ - **対話的なテーブル選択**: 既存のテーブルのリストを表示し、操作対象を選択できます。
11
+ - **新規テーブル作成**: カラム定義、データ型、主キー、制約などを対話形式で設定し、新しいテーブルを作成できます。
12
+ - **テーブルスキーマ変更**:
13
+ - 新しいカラムの追加
14
+ - 既存カラムの削除(古いSQLiteバージョンでも安全な方法で実行)
15
+ - テーブルのリネーム
16
+ - **スキーマ表示**: 選択したテーブルのスキーマ(構造)をいつでも表示できます。
17
+
18
+ ### データ管理
19
+ - **ページネーション付きデータブラウザ**: テーブルのデータをページ分割して表示するため、巨大なデータセットも簡単に閲覧できます。
20
+ - **単一行の操作**:
21
+ - 特定の行を選択して詳細を表示
22
+ - 選択した行の特定のカラムを更新
23
+ - 選択した行を削除
24
+ - **複数行の一括操作**:
25
+ - **安全なWHERE句ビルダー**: カラム、演算子、値を対話形式で選択して`WHERE`句を構築し、SQLインジェクションを防止します。
26
+ - 構築した`WHERE`句に一致する全ての行を一括更新
27
+ - 構築した`WHERE`句に一致する全ての行を一括削除
28
+ - **新規行の挿入**: 各カラムの値を対話形式で入力し、新しい行を挿入できます。
29
+
30
+ ### クエリ実行
31
+ - **カスタム`SELECT`クエリ**: 読み取り専用のカスタム`SELECT`クエリを実行し、複雑なデータ検索が可能です。
32
+
33
+ ### その他
34
+ - **国際化 (i18n)**: 複数の言語(日本語と英語)に対応しており、システムの言語設定を自動で判別します。
35
+ - **分かりやすいログ**: 成功、警告、エラーなどを色分けして明確にフィードバックします。
@@ -0,0 +1,147 @@
1
+ {
2
+ "common": {
3
+ "error": "Error",
4
+ "cancel": "Cancelled",
5
+ "back": "Back",
6
+ "confirm": "Are you sure?",
7
+ "lang_description": "Set language (en or ja)",
8
+ "usage_description": "A CLI tool that allows anyone to easily edit and create SQLite databases.",
9
+ "dbpath_description": "Path to the SQLite database file."
10
+ },
11
+ "db": {
12
+ "notFound": "Database file '{dbPath}' not found. Create a new one?",
13
+ "fileTypeError": "File name must end with .db or .sqlite.",
14
+ "connected": ">> Connected to {dbName}.",
15
+ "newDb": ">> Creating new database '{dbName}'.",
16
+ "newDbPrompt": "Enter the file name for the new database",
17
+ "newDbValidateExists": "A file with the same name already exists.",
18
+ "newDbValidateEmpty": "File name cannot be empty.",
19
+ "selectDb": "Select a database to edit ({count} databases found)",
20
+ "selectDbNotFound": "No databases found. Please create a new one.",
21
+ "newDbChoice": "Create a new database...",
22
+ "connectionClosed": ">> Connection closed.",
23
+ "tableInfoError": "[ERROR] Error getting table information: {message}"
24
+ },
25
+ "ui": {
26
+ "selectTable": "Select a table to edit or create ({count} tables found)",
27
+ "selectTableNotFound": "No tables found. Please create a new one.",
28
+ "newTableChoice": "Create a new table...",
29
+ "exitChoice": "Exit",
30
+ "noRows": "This table has no rows.",
31
+ "pkFound": ">> Using auto-detected primary key '{idKey}'.",
32
+ "pkNotFound": ">> Could not auto-detect primary key.",
33
+ "selectUniqueColumn": "Select a unique column to identify rows",
34
+ "selectRow": "Select a row to edit (Page {currentPage}/{totalPages})",
35
+ "nextPage": "Next Page ->",
36
+ "prevPage": "<- Previous Page",
37
+ "selectedRow": "\nSelected row:",
38
+ "rowAction": "Select an action",
39
+ "editColumn": "Edit a column",
40
+ "deleteRow": "Delete this row",
41
+ "selectAnotherRow": "Select another row",
42
+ "tableAction": "Select an action for table '{table}'",
43
+ "selectRowAction": "Select a row to edit/delete",
44
+ "multiRowAction": "Search/operate on multiple rows by condition",
45
+ "insertRowAction": "Insert a new row",
46
+ "alterTableAction": "Alter table schema",
47
+ "showSchemaAction": "Show table schema again",
48
+ "selectAnotherTable": "Select another table",
49
+ "schemaHeader": "\n--- Table Schema: {table} ---",
50
+ "schemaFooter": "------------------------------------",
51
+ "alterTable": {
52
+ "message": "Select a schema modification action",
53
+ "addColumn": "Add column",
54
+ "dropColumn": "Drop column",
55
+ "renameTable": "Rename table"
56
+ },
57
+ "multiRow": {
58
+ "wherePrompt": "Enter WHERE clause to filter rows (e.g., name = 'Taro' AND age > 20):",
59
+ "whereEmpty": "Operation cancelled because WHERE clause was empty.",
60
+ "noRowsFound": "No rows matched the specified condition.",
61
+ "rowsFound": "Found {count} matching rows.",
62
+ "actionPrompt": "Select an action to perform on these rows:",
63
+ "updateAll": "Update all {count} found rows",
64
+ "deleteAll": "Delete all {count} found rows"
65
+ }
66
+ },
67
+ "actions": {
68
+ "selectColumn": "Select a column to edit",
69
+ "newValuePrompt": "Enter the new value (Current: {value}, Type: {type})",
70
+ "invalidInput": "Invalid input. Please enter a value of type '{type}'.",
71
+ "updateHeader": "\n--- Changes ---",
72
+ "updateTable": "Table : {table}",
73
+ "updateRow": "Row : {idKey}={rowId}",
74
+ "updateColumn": "Column: {column}",
75
+ "updateValue": "New Value: {value}",
76
+ "updateFooter": "-------------\n",
77
+ "updateSuccess": "\nUpdate successful",
78
+ "updateError": "[ERROR] Error during update: {message}",
79
+ "insertHeader": "\n--- Insert a new row into '{table}' ---",
80
+ "pkAuto": "[INFO] Primary key '{name}' will be set automatically.",
81
+ "columnValuePrompt": "Enter value for column '{name}' (Type: {type}, Default: {default})",
82
+ "notNullError": "This column cannot be NULL.",
83
+ "insertContentHeader": "\n--- Content to Insert ---",
84
+ "insertContentFooter": "-------------------------\n",
85
+ "insertCancelled": ">> Insertion cancelled.",
86
+ "insertSuccess": ">> Insertion successful. (lastInsertRowid: {rowid})",
87
+ "insertWarning": "\n[WARNING] Insertion failed or did not change anything.",
88
+ "insertError": "[ERROR] Error during row insertion: {message}",
89
+ "deleteHeader": "\n--- Row to Delete ---",
90
+ "deleteConfirm": "Are you sure you want to delete this row? This action cannot be undone.",
91
+ "deleteCancelled": ">> Deletion cancelled.",
92
+ "deleteSuccess": ">> Row deleted successfully.",
93
+ "deleteWarning": "\n[WARNING] Row not found or not deleted.",
94
+ "deleteError": "[ERROR] Error during row deletion: {message}",
95
+ "createTableHeader": "\n--- Create a New Table ---",
96
+ "tableNamePrompt": "Enter the table name:",
97
+ "tableNameValidateEmpty": "Table name cannot be empty.",
98
+ "tableNameValidateInvalid": "Table name can only contain alphanumeric characters and underscores.",
99
+ "columnNamePrompt": "Column name:",
100
+ "columnNameValidateEmpty": "Column name cannot be empty.",
101
+ "columnNameValidateInvalid": "Column name can only contain alphanumeric characters and underscores.",
102
+ "columnTypePrompt": "Data type:",
103
+ "pkPrompt": "Is this column the primary key?",
104
+ "notNullPrompt": "Add a NOT NULL constraint?",
105
+ "defaultValuePrompt": "Default value (optional):",
106
+ "addMoreColumnsPrompt": "Add another column?",
107
+ "createTableCancel": "[WARNING] Table creation cancelled because no columns were defined.",
108
+ "sqlHeader": "\n--- Generated SQL ---",
109
+ "sqlFooter": "---------------------\n",
110
+ "sqlConfirm": "Execute this SQL to create the table?",
111
+ "createSuccess": ">> Table '{tableName}' created successfully.",
112
+ "createError": "[ERROR] Error during table creation: {message}",
113
+ "createCancelled": ">> Table creation cancelled.",
114
+ "customQueryHeader": "Execute Custom SELECT Query",
115
+ "customQueryPrompt": "Enter the SELECT query to execute:",
116
+ "customQueryValidateEmpty": "Query cannot be empty.",
117
+ "customQueryResultHeader": "\n--- Query Results ---",
118
+ "customQueryResultFooter": "---------------------",
119
+ "customQueryNoResult": "\nQuery was successful, but returned no rows.",
120
+ "customQueryError": "[ERROR] Error during query execution: {message}",
121
+ "readOnlyError": "Only read-only SELECT queries are allowed.",
122
+ "addColumnHeader": "\n--- Add new column to '{table}' ---",
123
+ "addColumnSuccess": ">> Column '{name}' was successfully added to table '{table}'.",
124
+ "alterError": "[ERROR] Error during schema modification: {message}",
125
+ "alterCancelled": ">> Schema modification cancelled.",
126
+ "dropColumnLastError": "[ERROR] A table must have at least one column. Cannot drop the last one.",
127
+ "dropColumnPrompt": "Select the column to drop:",
128
+ "dropColumnSuccess": ">> Column '{name}' was successfully dropped from table '{table}'.",
129
+ "renameTableHeader": "\n--- Rename table '{table}' ---",
130
+ "renameTablePrompt": "Enter the new table name:",
131
+ "renameTableSuccess": ">> Table '{old}' was successfully renamed to '{new}'.",
132
+ "multiUpdate": {
133
+ "header": "Matched {count} rows (Table: {table}, Condition: {where})",
134
+ "selectColumn": "Select column to update:",
135
+ "newValuePrompt": "Enter the new value to set for '{column}':",
136
+ "confirm": "Are you sure you want to update all {count} rows? This action cannot be undone.",
137
+ "success": "Successfully updated {count} rows.",
138
+ "cancelled": "Bulk update cancelled."
139
+ },
140
+ "multiDelete": {
141
+ "header": "Matched {count} rows (Table: {table}, Condition: {where})",
142
+ "confirm": "Are you sure you want to delete all {count} rows? This action cannot be undone.",
143
+ "success": "Successfully deleted {count} rows.",
144
+ "cancelled": "Bulk delete cancelled."
145
+ }
146
+ }
147
+ }
@@ -0,0 +1,147 @@
1
+ {
2
+ "common": {
3
+ "error": "エラー",
4
+ "cancel": "キャンセルしました",
5
+ "back": "戻る",
6
+ "confirm": "この内容でよろしいですか?",
7
+ "lang_description": "言語を設定 (en または ja)",
8
+ "usage_description": "SQLiteデータベースを誰でも簡単に編集、作成できるCLIツール。",
9
+ "dbpath_description": "SQLiteデータベースファイルへのパス。"
10
+ },
11
+ "db": {
12
+ "notFound": "データベースファイル '{dbPath}' が見つかりません。新しく作成しますか?",
13
+ "fileTypeError": "ファイル名は .db または .sqlite で終わる必要があります。",
14
+ "connected": ">> {dbName} に接続しました。",
15
+ "newDb": ">> 新しいデータベース '{dbName}' を作成します。",
16
+ "newDbPrompt": "新しいデータベースのファイル名を入力してください",
17
+ "newDbValidateExists": "同じ名前のファイルが既に存在します。",
18
+ "newDbValidateEmpty": "ファイル名は空にできません。",
19
+ "selectDb": "編集するデータベースを選択 ({count}個のデータベースが見つかりました)",
20
+ "selectDbNotFound": "データベースが見つかりませんでした。新しいデータベースを作成してください。",
21
+ "newDbChoice": "新しいデータベースを作成...",
22
+ "connectionClosed": ">> 接続を終了しました。",
23
+ "tableInfoError": "[ERROR] テーブル情報の取得中にエラーが発生しました: {message}"
24
+ },
25
+ "ui": {
26
+ "selectTable": "編集または作成するテーブルを選択 ({count}個のテーブルが見つかりました)",
27
+ "selectTableNotFound": "テーブルが見つかりませんでした。新しいテーブルを作成してください。",
28
+ "newTableChoice": "新しいテーブルを作成...",
29
+ "exitChoice": "終了する",
30
+ "noRows": "このテーブルには行がありません。",
31
+ "pkFound": ">> 自動検出された主キー '{idKey}' を使用します。",
32
+ "pkNotFound": ">> 主キーが自動検出できませんでした。",
33
+ "selectUniqueColumn": "行の識別に使うユニークな列を選択してください",
34
+ "selectRow": "編集する行を選択 (ページ {currentPage}/{totalPages})",
35
+ "nextPage": "次のページ ->",
36
+ "prevPage": "<- 前のページ",
37
+ "selectedRow": "\n選択中の行:",
38
+ "rowAction": "実行する操作を選択",
39
+ "editColumn": "列を編集する",
40
+ "deleteRow": "この行を削除する",
41
+ "selectAnotherRow": "別の行を選択する",
42
+ "tableAction": "テーブル '{table}' に対する操作を選択",
43
+ "selectRowAction": "行を選択して編集/削除",
44
+ "multiRowAction": "複数行を条件で検索/操作",
45
+ "insertRowAction": "新しい行を挿入",
46
+ "alterTableAction": "テーブルスキーマを変更",
47
+ "showSchemaAction": "テーブルスキーマを再表示",
48
+ "selectAnotherTable": "別のテーブルを選択する",
49
+ "schemaHeader": "\n--- テーブルスキーマ: {table} ---",
50
+ "schemaFooter": "------------------------------------",
51
+ "alterTable": {
52
+ "message": "スキーマ変更の操作を選択してください",
53
+ "addColumn": "列を追加",
54
+ "dropColumn": "列を削除",
55
+ "renameTable": "テーブル名を変更"
56
+ },
57
+ "multiRow": {
58
+ "wherePrompt": "行をフィルタリングするためのWHERE句を入力してください (例: name = 'Taro' AND age > 20):",
59
+ "whereEmpty": "WHERE句が空のため、操作をキャンセルしました。",
60
+ "noRowsFound": "指定された条件に一致する行は見つかりませんでした。",
61
+ "rowsFound": "{count}件の行が見つかりました。",
62
+ "actionPrompt": "これらの行に対して実行する操作を選択してください:",
63
+ "updateAll": "見つかった{count}件の行をすべて更新する",
64
+ "deleteAll": "見つかった{count}件の行をすべて削除する"
65
+ }
66
+ },
67
+ "actions": {
68
+ "selectColumn": "編集するカラムを選択",
69
+ "newValuePrompt": "新しい値を入力 (現在値: {value}, 型: {type})",
70
+ "invalidInput": "無効な入力です。型 '{type}' に合った値を入力してください。",
71
+ "updateHeader": "\n--- 変更内容 ---",
72
+ "updateTable": "テーブル : {table}",
73
+ "updateRow": "行 : {idKey}={rowId}",
74
+ "updateColumn": "カラム : {column}",
75
+ "updateValue": "新しい値 : {value}",
76
+ "updateFooter": "----------------\n",
77
+ "updateSuccess": "\n更新完了",
78
+ "updateError": "[ERROR] 更新中にエラーが発生しました: {message}",
79
+ "insertHeader": "\n--- '{table}' に新しい行を挿入 ---",
80
+ "pkAuto": "[INFO] 主キー '{name}' は自動的に設定されます。",
81
+ "columnValuePrompt": "カラム '{name}' の値を入力 (型: {type}, デフォルト: {default})",
82
+ "notNullError": "このカラムはNULLにできません。",
83
+ "insertContentHeader": "\n--- 挿入内容 ---",
84
+ "insertContentFooter": "----------------\n",
85
+ "insertCancelled": ">> 挿入をキャンセルしました。",
86
+ "insertSuccess": ">> 挿入が完了しました。 (lastInsertRowid: {rowid})",
87
+ "insertWarning": "\n[WARNING] 挿入に失敗したか、何も変更されませんでした。",
88
+ "insertError": "[ERROR] 行の挿入中にエラーが発生しました: {message}",
89
+ "deleteHeader": "\n--- 削除対象の行 ---",
90
+ "deleteConfirm": "この行を本当に削除してよろしいですか?この操作は元に戻せません。",
91
+ "deleteCancelled": ">> 削除をキャンセルしました。",
92
+ "deleteSuccess": ">> 行の削除が完了しました。",
93
+ "deleteWarning": "\n[WARNING] 行が見つからなかったか、削除されませんでした。",
94
+ "deleteError": "[ERROR] 行の削除中にエラーが発生しました: {message}",
95
+ "createTableHeader": "\n--- 新しいテーブルを作成 ---",
96
+ "tableNamePrompt": "テーブル名を入力してください:",
97
+ "tableNameValidateEmpty": "テーブル名は空にできません。",
98
+ "tableNameValidateInvalid": "テーブル名には英数字とアンダースコアのみ使用できます。",
99
+ "columnNamePrompt": "カラム名:",
100
+ "columnNameValidateEmpty": "カラム名は空にできません。",
101
+ "columnNameValidateInvalid": "カラム名には英数字とアンダースコアのみ使用できます。",
102
+ "columnTypePrompt": "データ型:",
103
+ "pkPrompt": "このカラムを主キーにしますか?",
104
+ "notNullPrompt": "NOT NULL 制約を追加しますか?",
105
+ "defaultValuePrompt": "デフォルト値 (任意):",
106
+ "addMoreColumnsPrompt": "さらにカラムを追加しますか?",
107
+ "createTableCancel": "[WARNING] カラムが1つも定義されなかったため、テーブル作成をキャンセルしました。",
108
+ "sqlHeader": "\n--- 生成されたSQL ---",
109
+ "sqlFooter": "---------------------\n",
110
+ "sqlConfirm": "このSQLを実行してテーブルを作成しますか?",
111
+ "createSuccess": ">> テーブル '{tableName}' が正常に作成されました。",
112
+ "createError": "[ERROR] テーブル作成中にエラーが発生しました: {message}",
113
+ "createCancelled": ">> テーブル作成をキャンセルしました。",
114
+ "customQueryHeader": "カスタムSELECTクエリを実行",
115
+ "customQueryPrompt": "実行するSELECTクエリを入力してください:",
116
+ "customQueryValidateEmpty": "クエリは空にできません。",
117
+ "customQueryResultHeader": "\n--- クエリ実行結果 ---",
118
+ "customQueryResultFooter": "----------------------",
119
+ "customQueryNoResult": "\nクエリは成功しましたが、結果は0行でした。",
120
+ "customQueryError": "[ERROR] クエリ実行中にエラーが発生しました: {message}",
121
+ "readOnlyError": "読み取り専用のSELECTクエリのみが許可されています。",
122
+ "addColumnHeader": "\n--- '{table}' に新しい列を追加 ---",
123
+ "addColumnSuccess": ">> 列 '{name}' がテーブル '{table}' に正常に追加されました。",
124
+ "alterError": "[ERROR] スキーマ変更中にエラーが発生しました: {message}",
125
+ "alterCancelled": ">> スキーマ変更をキャンセルしました。",
126
+ "dropColumnLastError": "[ERROR] テーブルには少なくとも1つの列が必要です。これ以上削除できません。",
127
+ "dropColumnPrompt": "削除する列を選択してください:",
128
+ "dropColumnSuccess": ">> 列 '{name}' がテーブル '{table}' から正常に削除されました。",
129
+ "renameTableHeader": "\n--- テーブル '{table}' の名前を変更 ---",
130
+ "renameTablePrompt": "新しいテーブル名を入力してください:",
131
+ "renameTableSuccess": ">> テーブル '{old}' の名前が '{new}' に正常に変更されました。",
132
+ "multiUpdate": {
133
+ "header": "{count}件の行が一致しました (テーブル: {table}, 条件: {where})",
134
+ "selectColumn": "更新する列を選択してください:",
135
+ "newValuePrompt": "'{column}' に設定する新しい値を入力してください:",
136
+ "confirm": "{count}件の行すべてを更新してもよろしいですか?この操作は元に戻せません。",
137
+ "success": "{count}件の行が正常に更新されました。",
138
+ "cancelled": "複数行の更新をキャンセルしました。"
139
+ },
140
+ "multiDelete": {
141
+ "header": "{count}件の行が一致しました (テーブル: {table}, 条件: {where})",
142
+ "confirm": "{count}件の行すべてを削除してもよろしいですか?この操作は元に戻せません。",
143
+ "success": "{count}件の行が正常に削除されました。",
144
+ "cancelled": "複数行の削除をキャンセルしました。"
145
+ }
146
+ }
147
+ }