Skip to content

Commit

Permalink
Add table creation script obtainig for h2 databases
Browse files Browse the repository at this point in the history
  • Loading branch information
kostafey committed Jan 6, 2024
1 parent 1288171 commit b80b773
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ejc_sql/structure.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
;;; structure.clj -- Receive database stucture and keep it in cache.

;;; Copyright © 2016-2023 - Kostafey <[email protected]>
;;; Copyright © 2016-2024 - Kostafey <[email protected]>

;;; This program is free software; you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -366,6 +366,12 @@
FROM information_schema.tables AS t
WHERE UPPER(t.table_name) = '%s' "
(s/upper-case entity-name)))
:table (fn [& {:keys [entity-name]}]
(format "
SELECT sql
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = '%s' "
(s/upper-case entity-name)))
:view (fn [& {:keys [entity-name]}]
((default-queries :view) :entity-name entity-name))}
;;--------
Expand Down

0 comments on commit b80b773

Please sign in to comment.