Skip to main content

max / makenotwork

2.3 KB · 77 lines History Blame Raw
1 {
2 "db_name": "PostgreSQL",
3 "query": "\n SELECT s.id AS \"id: SubscriptionId\", s.project_id AS \"project_id!: ProjectId\",\n p.title AS project_title, p.slug AS \"project_slug: super::Slug\",\n t.name AS tier_name, t.price_cents, s.status AS \"status: super::SubscriptionStatus\",\n s.current_period_end AS \"current_period_end: chrono::DateTime<chrono::Utc>\",\n s.stripe_subscription_id,\n u.settlement_currency AS \"settlement_currency: crate::currency::SettlementCurrency\"\n FROM subscriptions s\n JOIN projects p ON p.id = s.project_id\n JOIN users u ON u.id = p.user_id\n JOIN subscription_tiers t ON t.id = s.tier_id\n WHERE s.subscriber_id = $1\n ORDER BY s.created_at DESC\n LIMIT 1000\n ",
4 "describe": {
5 "columns": [
6 {
7 "ordinal": 0,
8 "name": "id: SubscriptionId",
9 "type_info": "Uuid"
10 },
11 {
12 "ordinal": 1,
13 "name": "project_id!: ProjectId",
14 "type_info": "Uuid"
15 },
16 {
17 "ordinal": 2,
18 "name": "project_title",
19 "type_info": "Varchar"
20 },
21 {
22 "ordinal": 3,
23 "name": "project_slug: super::Slug",
24 "type_info": "Varchar"
25 },
26 {
27 "ordinal": 4,
28 "name": "tier_name",
29 "type_info": "Varchar"
30 },
31 {
32 "ordinal": 5,
33 "name": "price_cents",
34 "type_info": "Int4"
35 },
36 {
37 "ordinal": 6,
38 "name": "status: super::SubscriptionStatus",
39 "type_info": "Varchar"
40 },
41 {
42 "ordinal": 7,
43 "name": "current_period_end: chrono::DateTime<chrono::Utc>",
44 "type_info": "Timestamptz"
45 },
46 {
47 "ordinal": 8,
48 "name": "stripe_subscription_id",
49 "type_info": "Text"
50 },
51 {
52 "ordinal": 9,
53 "name": "settlement_currency: crate::currency::SettlementCurrency",
54 "type_info": "Varchar"
55 }
56 ],
57 "parameters": {
58 "Left": [
59 "Uuid"
60 ]
61 },
62 "nullable": [
63 false,
64 true,
65 false,
66 false,
67 false,
68 false,
69 false,
70 true,
71 false,
72 false
73 ]
74 },
75 "hash": "d820fd0adfcf42d57f4e06ed290dbaa19c88c4ac8a0e09080bac17c11b7ccfed"
76 }
77