Skip to main content

max / makenotwork

4.2 KB · 152 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "\n UPDATE transactions\n SET status = 'completed',\n stripe_payment_intent_id = $2,\n completed_at = NOW(),\n guest_email = $3,\n claim_token = $4,\n buyer_id = NULL\n WHERE stripe_checkout_session_id = $1\n AND status = 'pending'\n RETURNING\n id AS \"id: TransactionId\", buyer_id AS \"buyer_id: UserId\", seller_id AS \"seller_id: UserId\",\n item_id AS \"item_id: ItemId\", amount_cents AS \"amount_cents: Cents\", platform_fee_cents AS \"platform_fee_cents: Cents\",\n currency, status AS \"status: crate::db::TransactionStatus\", stripe_payment_intent_id, stripe_checkout_session_id,\n created_at AS \"created_at: chrono::DateTime<chrono::Utc>\", completed_at AS \"completed_at: chrono::DateTime<chrono::Utc>\",\n item_title, seller_username, share_contact, project_id AS \"project_id: ProjectId\",\n parent_transaction_id AS \"parent_transaction_id: TransactionId\", promo_code_id AS \"promo_code_id: PromoCodeId\",\n guest_email, claim_token AS \"claim_token: ClaimToken\", claimed_by AS \"claimed_by: UserId\",\n download_token AS \"download_token: DownloadToken\"\n ",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "id: TransactionId",
9 "type_info": "Uuid"
10 },
11 {
12 "ordinal": 1,
13 "name": "buyer_id: UserId",
14 "type_info": "Uuid"
15 },
16 {
17 "ordinal": 2,
18 "name": "seller_id: UserId",
19 "type_info": "Uuid"
20 },
21 {
22 "ordinal": 3,
23 "name": "item_id: ItemId",
24 "type_info": "Uuid"
25 },
26 {
27 "ordinal": 4,
28 "name": "amount_cents: Cents",
29 "type_info": "Int4"
30 },
31 {
32 "ordinal": 5,
33 "name": "platform_fee_cents: Cents",
34 "type_info": "Int4"
35 },
36 {
37 "ordinal": 6,
38 "name": "currency",
39 "type_info": "Varchar"
40 },
41 {
42 "ordinal": 7,
43 "name": "status: crate::db::TransactionStatus",
44 "type_info": "Varchar"
45 },
46 {
47 "ordinal": 8,
48 "name": "stripe_payment_intent_id",
49 "type_info": "Varchar"
50 },
51 {
52 "ordinal": 9,
53 "name": "stripe_checkout_session_id",
54 "type_info": "Varchar"
55 },
56 {
57 "ordinal": 10,
58 "name": "created_at: chrono::DateTime<chrono::Utc>",
59 "type_info": "Timestamptz"
60 },
61 {
62 "ordinal": 11,
63 "name": "completed_at: chrono::DateTime<chrono::Utc>",
64 "type_info": "Timestamptz"
65 },
66 {
67 "ordinal": 12,
68 "name": "item_title",
69 "type_info": "Varchar"
70 },
71 {
72 "ordinal": 13,
73 "name": "seller_username",
74 "type_info": "Varchar"
75 },
76 {
77 "ordinal": 14,
78 "name": "share_contact",
79 "type_info": "Bool"
80 },
81 {
82 "ordinal": 15,
83 "name": "project_id: ProjectId",
84 "type_info": "Uuid"
85 },
86 {
87 "ordinal": 16,
88 "name": "parent_transaction_id: TransactionId",
89 "type_info": "Uuid"
90 },
91 {
92 "ordinal": 17,
93 "name": "promo_code_id: PromoCodeId",
94 "type_info": "Uuid"
95 },
96 {
97 "ordinal": 18,
98 "name": "guest_email",
99 "type_info": "Varchar"
100 },
101 {
102 "ordinal": 19,
103 "name": "claim_token: ClaimToken",
104 "type_info": "Uuid"
105 },
106 {
107 "ordinal": 20,
108 "name": "claimed_by: UserId",
109 "type_info": "Uuid"
110 },
111 {
112 "ordinal": 21,
113 "name": "download_token: DownloadToken",
114 "type_info": "Uuid"
115 }
116 ],
117 "parameters": {
118 "Left": [
119 "Text",
120 "Varchar",
121 "Varchar",
122 "Uuid"
123 ]
124 },
125 "nullable": [
126 false,
127 true,
128 true,
129 true,
130 false,
131 false,
132 false,
133 false,
134 true,
135 true,
136 false,
137 true,
138 true,
139 true,
140 false,
141 true,
142 true,
143 true,
144 true,
145 true,
146 true,
147 true
148 ]
149 },
150 "hash": "cc928551715745e7ef7b8521ba8d24972c2c9ab12404bed2000a896e7c5f1e4f"
151 }
152