Skip to content

Commit 886114c

Browse files
committed
WIP
1 parent 9963270 commit 886114c

File tree

12 files changed

+1455
-0
lines changed

12 files changed

+1455
-0
lines changed

lib/data_layer.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ defmodule AshPostgres.DataLayer do
721721
when type in [:count, :sum, :first, :list, :avg, :max, :min, :exists, :custom],
722722
do: true
723723

724+
def can?(_, {:aggregate, :unrelated}), do: true
724725
def can?(_, :aggregate_filter), do: true
725726
def can?(_, :aggregate_sort), do: true
726727
def can?(_, :calculate), do: true
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"attributes": [
3+
{
4+
"allow_nil?": false,
5+
"default": "fragment(\"gen_random_uuid()\")",
6+
"generated?": false,
7+
"precision": null,
8+
"primary_key?": true,
9+
"references": null,
10+
"scale": null,
11+
"size": null,
12+
"source": "id",
13+
"type": "uuid"
14+
},
15+
{
16+
"allow_nil?": true,
17+
"default": "nil",
18+
"generated?": false,
19+
"precision": null,
20+
"primary_key?": false,
21+
"references": null,
22+
"scale": null,
23+
"size": null,
24+
"source": "name",
25+
"type": "text"
26+
},
27+
{
28+
"allow_nil?": true,
29+
"default": "nil",
30+
"generated?": false,
31+
"precision": null,
32+
"primary_key?": false,
33+
"references": null,
34+
"scale": null,
35+
"size": null,
36+
"source": "age",
37+
"type": "bigint"
38+
},
39+
{
40+
"allow_nil?": true,
41+
"default": "nil",
42+
"generated?": false,
43+
"precision": null,
44+
"primary_key?": false,
45+
"references": null,
46+
"scale": null,
47+
"size": null,
48+
"source": "bio",
49+
"type": "text"
50+
},
51+
{
52+
"allow_nil?": true,
53+
"default": "true",
54+
"generated?": false,
55+
"precision": null,
56+
"primary_key?": false,
57+
"references": null,
58+
"scale": null,
59+
"size": null,
60+
"source": "active",
61+
"type": "boolean"
62+
},
63+
{
64+
"allow_nil?": true,
65+
"default": "nil",
66+
"generated?": false,
67+
"precision": null,
68+
"primary_key?": false,
69+
"references": null,
70+
"scale": null,
71+
"size": null,
72+
"source": "owner_id",
73+
"type": "uuid"
74+
}
75+
],
76+
"base_filter": null,
77+
"check_constraints": [],
78+
"custom_indexes": [],
79+
"custom_statements": [],
80+
"has_create_action": true,
81+
"hash": "B32650B5196D79814F5D5EF0481C757CDE5F7545E787EA911A13B9B9CBD38E7E",
82+
"identities": [],
83+
"multitenancy": {
84+
"attribute": null,
85+
"global": null,
86+
"strategy": null
87+
},
88+
"repo": "Elixir.AshPostgres.TestRepo",
89+
"schema": null,
90+
"table": "unrelated_profiles"
91+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"attributes": [
3+
{
4+
"allow_nil?": false,
5+
"default": "fragment(\"gen_random_uuid()\")",
6+
"generated?": false,
7+
"precision": null,
8+
"primary_key?": true,
9+
"references": null,
10+
"scale": null,
11+
"size": null,
12+
"source": "id",
13+
"type": "uuid"
14+
},
15+
{
16+
"allow_nil?": true,
17+
"default": "nil",
18+
"generated?": false,
19+
"precision": null,
20+
"primary_key?": false,
21+
"references": null,
22+
"scale": null,
23+
"size": null,
24+
"source": "title",
25+
"type": "text"
26+
},
27+
{
28+
"allow_nil?": true,
29+
"default": "nil",
30+
"generated?": false,
31+
"precision": null,
32+
"primary_key?": false,
33+
"references": null,
34+
"scale": null,
35+
"size": null,
36+
"source": "author_name",
37+
"type": "text"
38+
},
39+
{
40+
"allow_nil?": true,
41+
"default": "nil",
42+
"generated?": false,
43+
"precision": null,
44+
"primary_key?": false,
45+
"references": null,
46+
"scale": null,
47+
"size": null,
48+
"source": "score",
49+
"type": "bigint"
50+
},
51+
{
52+
"allow_nil?": false,
53+
"default": "fragment(\"(now() AT TIME ZONE 'utc')\")",
54+
"generated?": false,
55+
"precision": null,
56+
"primary_key?": false,
57+
"references": null,
58+
"scale": null,
59+
"size": null,
60+
"source": "inserted_at",
61+
"type": "utc_datetime"
62+
}
63+
],
64+
"base_filter": null,
65+
"check_constraints": [],
66+
"custom_indexes": [],
67+
"custom_statements": [],
68+
"has_create_action": true,
69+
"hash": "728B41F3FC4BC58102261057925992766C0A3D9ED3AD7D16B887CCF8EF6B6E19",
70+
"identities": [],
71+
"multitenancy": {
72+
"attribute": null,
73+
"global": null,
74+
"strategy": null
75+
},
76+
"repo": "Elixir.AshPostgres.TestRepo",
77+
"schema": null,
78+
"table": "unrelated_reports"
79+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"attributes": [
3+
{
4+
"allow_nil?": false,
5+
"default": "fragment(\"gen_random_uuid()\")",
6+
"generated?": false,
7+
"precision": null,
8+
"primary_key?": true,
9+
"references": null,
10+
"scale": null,
11+
"size": null,
12+
"source": "id",
13+
"type": "uuid"
14+
},
15+
{
16+
"allow_nil?": true,
17+
"default": "nil",
18+
"generated?": false,
19+
"precision": null,
20+
"primary_key?": false,
21+
"references": null,
22+
"scale": null,
23+
"size": null,
24+
"source": "name",
25+
"type": "text"
26+
},
27+
{
28+
"allow_nil?": true,
29+
"default": "nil",
30+
"generated?": false,
31+
"precision": null,
32+
"primary_key?": false,
33+
"references": null,
34+
"scale": null,
35+
"size": null,
36+
"source": "age",
37+
"type": "bigint"
38+
},
39+
{
40+
"allow_nil?": true,
41+
"default": "true",
42+
"generated?": false,
43+
"precision": null,
44+
"primary_key?": false,
45+
"references": null,
46+
"scale": null,
47+
"size": null,
48+
"source": "active",
49+
"type": "boolean"
50+
},
51+
{
52+
"allow_nil?": true,
53+
"default": "nil",
54+
"generated?": false,
55+
"precision": null,
56+
"primary_key?": false,
57+
"references": null,
58+
"scale": null,
59+
"size": null,
60+
"source": "owner_id",
61+
"type": "uuid"
62+
},
63+
{
64+
"allow_nil?": true,
65+
"default": "nil",
66+
"generated?": false,
67+
"precision": null,
68+
"primary_key?": false,
69+
"references": null,
70+
"scale": null,
71+
"size": null,
72+
"source": "department",
73+
"type": "text"
74+
}
75+
],
76+
"base_filter": null,
77+
"check_constraints": [],
78+
"custom_indexes": [],
79+
"custom_statements": [],
80+
"has_create_action": true,
81+
"hash": "56BB9374A010E8E23144743DEDD10B6557BCD002338D1B06A35431AB0320F88B",
82+
"identities": [],
83+
"multitenancy": {
84+
"attribute": null,
85+
"global": null,
86+
"strategy": null
87+
},
88+
"repo": "Elixir.AshPostgres.TestRepo",
89+
"schema": null,
90+
"table": "unrelated_secure_profiles"
91+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"attributes": [
3+
{
4+
"allow_nil?": false,
5+
"default": "fragment(\"gen_random_uuid()\")",
6+
"generated?": false,
7+
"precision": null,
8+
"primary_key?": true,
9+
"references": null,
10+
"scale": null,
11+
"size": null,
12+
"source": "id",
13+
"type": "uuid"
14+
},
15+
{
16+
"allow_nil?": true,
17+
"default": "nil",
18+
"generated?": false,
19+
"precision": null,
20+
"primary_key?": false,
21+
"references": null,
22+
"scale": null,
23+
"size": null,
24+
"source": "name",
25+
"type": "text"
26+
},
27+
{
28+
"allow_nil?": true,
29+
"default": "nil",
30+
"generated?": false,
31+
"precision": null,
32+
"primary_key?": false,
33+
"references": null,
34+
"scale": null,
35+
"size": null,
36+
"source": "age",
37+
"type": "bigint"
38+
},
39+
{
40+
"allow_nil?": true,
41+
"default": "nil",
42+
"generated?": false,
43+
"precision": null,
44+
"primary_key?": false,
45+
"references": null,
46+
"scale": null,
47+
"size": null,
48+
"source": "email",
49+
"type": "text"
50+
},
51+
{
52+
"allow_nil?": true,
53+
"default": "\"user\"",
54+
"generated?": false,
55+
"precision": null,
56+
"primary_key?": false,
57+
"references": null,
58+
"scale": null,
59+
"size": null,
60+
"source": "role",
61+
"type": "text"
62+
}
63+
],
64+
"base_filter": null,
65+
"check_constraints": [],
66+
"custom_indexes": [],
67+
"custom_statements": [],
68+
"has_create_action": true,
69+
"hash": "E56D245A9DA955A309FDF1BD11C215F3056FF9BA7A4D4D3A3D5E285F0D183AC2",
70+
"identities": [],
71+
"multitenancy": {
72+
"attribute": null,
73+
"global": null,
74+
"strategy": null
75+
},
76+
"repo": "Elixir.AshPostgres.TestRepo",
77+
"schema": null,
78+
"table": "unrelated_users"
79+
}

0 commit comments

Comments
 (0)