From a317b3ba06c0388895849e383a48ab1be222a902 Mon Sep 17 00:00:00 2001 From: Repinoid Date: Fri, 2 Oct 2026 11:47:34 +0300 Subject: [PATCH] Port Lucee CRUD to MariaDB --- .gitignore | 39 +++++++ Application.cfc | 205 ++++++++++++++++++++++++++++++++ README.md | 4 + assets/favicon.svg | 55 +++++++++ assets/logo.svg | 25 ++++ index.cfm | 286 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 614 insertions(+) create mode 100644 .gitignore create mode 100644 Application.cfc create mode 100644 README.md create mode 100644 assets/favicon.svg create mode 100755 assets/logo.svg create mode 100644 index.cfm diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3cb45b0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# Binaries +*.exe +*.dll +*.so +*.dylib +*.class +*.jar +*.war +*.ear +*.zip +*.tar.gz +*.tar + +# IDE +.idea/ +.vscode/ +*.swp +*.swo +*~ +*.sublime-* + +# OS +.DS_Store +Thumbs.db +Desktop.ini + +# Lucee / ColdFusion +WEB-INF/ +cfclasses/ +.cfclasses/ + +# Temp +tmp/ +temp/ +*.tmp +*.log + +# Git +.git/ diff --git a/Application.cfc b/Application.cfc new file mode 100644 index 0000000..a6c33c4 --- /dev/null +++ b/Application.cfc @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CREATE TABLE IF NOT EXISTS #tableName# ( + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + `value` TEXT NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + created_by VARCHAR(255) NOT NULL DEFAULT '' + ) + + + + ALTER TABLE #tableName# ADD COLUMN IF NOT EXISTS created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + + + ALTER TABLE #tableName# ADD COLUMN IF NOT EXISTS created_by VARCHAR(255) NOT NULL DEFAULT '' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..c9a2b7a --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Lucee MariaDB CRUD + +Lucee + MariaDB. Использует JDBC-драйвер MariaDB, заданный через `testds_*` env vars. +Деплоится через Terraform (`nubes_lucee`). diff --git a/assets/favicon.svg b/assets/favicon.svg new file mode 100644 index 0000000..11a9ece --- /dev/null +++ b/assets/favicon.svg @@ -0,0 +1,55 @@ + + diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100755 index 0000000..d76eef6 --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + diff --git a/index.cfm b/index.cfm new file mode 100644 index 0000000..bf75b09 --- /dev/null +++ b/index.cfm @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + INSERT INTO #tableName# (`value`, created_by) + VALUES ( + , + + ) + + + + + + + UPDATE #tableName# + SET `value` = + WHERE id = + + + + + + + DELETE FROM #tableName# + WHERE id = + + + + + + + + + + + + + + + SELECT id, `value`, created_at, created_by FROM #tableName# + WHERE id = + + + + + + + + + + + SELECT id, `value`, created_at, created_by FROM #tableName# ORDER BY id + + + + + + + CRUD Lucee Example — <cfoutput>#tableName#</cfoutput> + + + + +
+ +
+ Nubes +

CRUD Lucee Example

+
+ +
+
Записи
+
+ + + + + + + + + + + + + + + + +
IDVALUEДОБАВЛЕНОКЕМ
#id##value##dateFormat(created_at, 'dd.mm.yyyy')# #timeFormat(created_at, 'HH:mm:ss')##created_by# + ✏️ + +
+ + + +
+
+ +
Нет записей. Создайте первую.
+
+
+
+ +
+ + +
Редактировать #editRow.id#
+
+
+ + +
+ + + Отмена +
+
+
+
+ +
Добавить
+
+
+ +
+ + +
+
+
+
+
+ +
+ +
+ v#request.appVersion# — #tableName# +
+ +