Skip to content

Using Custom Models in Query #376

Answered by houten11
safaci2000 asked this question in Q&A
Discussion options

You must be logged in to vote

Jet doesn't use db tag. To avoid writing full struct name you can use alias tag:

type GetBucketPolicyByEnvRow struct {
	BucketID        int64  `alias:"buckets.bucket_id" json:"bucketId"`
	PolicyID        int64  `alias:"bucket_policy.policy_id" json:"policyId"`
	EnvironmentName string `alias:"buckets.environment_name" json:"environmentName"`
	CreateBucket    bool   `alias:"buckets.create_bucket" json:"createBucket"`
	BucketName      string `alias:"buckets.bucket_name" json:"bucketName"`
	PolicyName      string `alias:"bucket_policy.policy_name" json:"policyName"`
	Duration        int16  `alias:"bucket_policy.duration" json:"duration"`
	Prefix          string `alias:"bucket_policy.prefix" j…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@safaci2000
Comment options

Answer selected by safaci2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants