Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
ad3729a6
Commit
ad3729a6
authored
10 years ago
by
Allen Gilliland
Browse files
Options
Downloads
Patches
Plain Diff
add :pk_field back onto the GET /api/meta/table/:id response
parent
d7b472c1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/api/meta/table.clj
+1
-1
1 addition, 1 deletion
src/metabase/api/meta/table.clj
src/metabase/models/table.clj
+1
-0
1 addition, 0 deletions
src/metabase/models/table.clj
with
2 additions
and
1 deletion
src/metabase/api/meta/table.clj
+
1
−
1
View file @
ad3729a6
...
...
@@ -13,7 +13,7 @@
(
defendpoint
GET
"/:id"
[
id
]
(
->404
(
sel
:one
Table
:id
id
)
(
hydrate
:db
)))
(
hydrate
:db
:pk_field
)))
(
defendpoint
PUT
"/:id"
[
id
:as
{
body
:body
}]
(
write-check
Table
id
)
...
...
This diff is collapsed.
Click to expand it.
src/metabase/models/table.clj
+
1
−
0
View file @
ad3729a6
...
...
@@ -14,6 +14,7 @@
:db
(
or
db
(
delay
(
sel
:one
db/Database
:id
db_id
)))
; Check to see if `:db` is already set. In some cases we add a korma transform fn to `Table`
:fields
(
delay
(
sel
:many
Field
:table_id
id
))
; and assoc :db if the DB has already been fetched, so we can re-use its DB connections.
:description
(
u/jdbc-clob->str
description
)
:pk_field
(
delay
(
:id
(
sel
:one
:fields
[
Field
:id
]
:table_id
id
(
where
{
:special_type
"id"
}))))
:can_read
(
delay
@
(
:can_read
@
(
:db
<>
)))
:can_write
(
delay
@
(
:can_write
@
(
:db
<>
)))))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment