mirror of
https://github.com/johndoe6345789/postgres.git
synced 2026-04-24 13:55:00 +00:00
- Add index-management feature to features.json - Create /api/admin/indexes endpoint (GET, POST, DELETE) - Build IndexManagerTab component for managing indexes - Add support for BTREE, HASH, GIN, GIST, BRIN index types - Add unique index creation option - Add multi-column index support - Create comprehensive integration tests (30+ tests) - Add getIndexTypes utility function - Update navigation to include Index Manager - Add SQL injection prevention for all operations Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
279 lines
7.1 KiB
JSON
279 lines
7.1 KiB
JSON
{
|
|
"features": [
|
|
{
|
|
"id": "database-crud",
|
|
"name": "Database CRUD Operations",
|
|
"description": "Create, read, update, and delete database records",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/record",
|
|
"methods": ["POST", "PUT", "DELETE"],
|
|
"description": "Manage database records"
|
|
},
|
|
{
|
|
"path": "/api/admin/table-data",
|
|
"methods": ["POST"],
|
|
"description": "Fetch table data"
|
|
},
|
|
{
|
|
"path": "/api/admin/table-schema",
|
|
"methods": ["POST"],
|
|
"description": "Fetch table schema information"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "Storage",
|
|
"actions": ["create", "read", "update", "delete"]
|
|
}
|
|
},
|
|
{
|
|
"id": "table-management",
|
|
"name": "Table Management",
|
|
"description": "Create and manage database tables",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/table-manage",
|
|
"methods": ["POST", "DELETE"],
|
|
"description": "Create and drop tables"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "TableChart",
|
|
"actions": ["create", "delete"]
|
|
}
|
|
},
|
|
{
|
|
"id": "column-management",
|
|
"name": "Column Management",
|
|
"description": "Add, modify, and delete table columns",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/column-manage",
|
|
"methods": ["POST", "PUT", "DELETE"],
|
|
"description": "Manage table columns"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "ViewColumn",
|
|
"actions": ["add", "modify", "delete"]
|
|
}
|
|
},
|
|
{
|
|
"id": "sql-query",
|
|
"name": "SQL Query Interface",
|
|
"description": "Execute custom SQL queries",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/query",
|
|
"methods": ["POST"],
|
|
"description": "Execute SQL queries"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "Code",
|
|
"actions": ["execute"]
|
|
}
|
|
},
|
|
{
|
|
"id": "constraint-management",
|
|
"name": "Constraint Management",
|
|
"description": "Add and manage table constraints (PRIMARY KEY, UNIQUE, CHECK)",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/constraints",
|
|
"methods": ["GET", "POST", "DELETE"],
|
|
"description": "Manage table constraints"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "Rule",
|
|
"actions": ["list", "add", "delete"]
|
|
}
|
|
},
|
|
{
|
|
"id": "query-builder",
|
|
"name": "Query Builder",
|
|
"description": "Visual query builder for creating SELECT queries",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/query-builder",
|
|
"methods": ["POST"],
|
|
"description": "Execute queries built with query builder"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "AccountTree",
|
|
"actions": ["build", "execute"]
|
|
}
|
|
},
|
|
{
|
|
"id": "index-management",
|
|
"name": "Index Management",
|
|
"description": "Create and manage database indexes for performance optimization",
|
|
"enabled": true,
|
|
"priority": "high",
|
|
"endpoints": [
|
|
{
|
|
"path": "/api/admin/indexes",
|
|
"methods": ["GET", "POST", "DELETE"],
|
|
"description": "Manage table indexes"
|
|
}
|
|
],
|
|
"ui": {
|
|
"showInNav": true,
|
|
"icon": "Speed",
|
|
"actions": ["list", "create", "delete"]
|
|
}
|
|
}
|
|
],
|
|
"constraintTypes": [
|
|
{
|
|
"name": "PRIMARY KEY",
|
|
"description": "Unique identifier for table rows",
|
|
"requiresColumn": true,
|
|
"requiresExpression": false
|
|
},
|
|
{
|
|
"name": "UNIQUE",
|
|
"description": "Ensure column values are unique",
|
|
"requiresColumn": true,
|
|
"requiresExpression": false
|
|
},
|
|
{
|
|
"name": "CHECK",
|
|
"description": "Validate data using a boolean expression",
|
|
"requiresColumn": false,
|
|
"requiresExpression": true
|
|
}
|
|
],
|
|
"dataTypes": [
|
|
{
|
|
"name": "INTEGER",
|
|
"category": "numeric",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "BIGINT",
|
|
"category": "numeric",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "SERIAL",
|
|
"category": "numeric",
|
|
"requiresLength": false,
|
|
"autoIncrement": true
|
|
},
|
|
{
|
|
"name": "VARCHAR",
|
|
"category": "text",
|
|
"requiresLength": true,
|
|
"defaultLength": 255
|
|
},
|
|
{
|
|
"name": "TEXT",
|
|
"category": "text",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "BOOLEAN",
|
|
"category": "boolean",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "TIMESTAMP",
|
|
"category": "datetime",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "DATE",
|
|
"category": "datetime",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "JSON",
|
|
"category": "json",
|
|
"requiresLength": false
|
|
},
|
|
{
|
|
"name": "JSONB",
|
|
"category": "json",
|
|
"requiresLength": false
|
|
}
|
|
],
|
|
"navItems": [
|
|
{
|
|
"id": "tables",
|
|
"label": "Tables",
|
|
"icon": "Storage",
|
|
"featureId": "database-crud"
|
|
},
|
|
{
|
|
"id": "query",
|
|
"label": "SQL Query",
|
|
"icon": "Code",
|
|
"featureId": "sql-query"
|
|
},
|
|
{
|
|
"id": "query-builder",
|
|
"label": "Query Builder",
|
|
"icon": "AccountTree",
|
|
"featureId": "query-builder"
|
|
},
|
|
{
|
|
"id": "table-manager",
|
|
"label": "Table Manager",
|
|
"icon": "TableChart",
|
|
"featureId": "table-management"
|
|
},
|
|
{
|
|
"id": "constraints",
|
|
"label": "Constraints",
|
|
"icon": "Rule",
|
|
"featureId": "constraint-management"
|
|
},
|
|
{
|
|
"id": "indexes",
|
|
"label": "Indexes",
|
|
"icon": "Speed",
|
|
"featureId": "index-management"
|
|
}
|
|
],
|
|
"indexTypes": [
|
|
{ "value": "BTREE", "label": "B-Tree (Default)", "description": "General purpose, balanced tree index" },
|
|
{ "value": "HASH", "label": "Hash", "description": "Fast equality searches" },
|
|
{ "value": "GIN", "label": "GIN", "description": "Generalized Inverted Index for full-text search" },
|
|
{ "value": "GIST", "label": "GiST", "description": "Generalized Search Tree for geometric data" },
|
|
{ "value": "BRIN", "label": "BRIN", "description": "Block Range Index for very large tables" }
|
|
],
|
|
"queryOperators": [
|
|
{ "value": "=", "label": "Equals" },
|
|
{ "value": "!=", "label": "Not Equals" },
|
|
{ "value": ">", "label": "Greater Than" },
|
|
{ "value": "<", "label": "Less Than" },
|
|
{ "value": ">=", "label": "Greater or Equal" },
|
|
{ "value": "<=", "label": "Less or Equal" },
|
|
{ "value": "LIKE", "label": "Like (Pattern Match)" },
|
|
{ "value": "IN", "label": "In List" },
|
|
{ "value": "IS NULL", "label": "Is Null" },
|
|
{ "value": "IS NOT NULL", "label": "Is Not Null" }
|
|
]
|
|
}
|