oso-oso 0.26.1 → 0.26.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/ext/oso-oso/lib/libpolar.dylib +0 -0
- data/ext/oso-oso/lib/libpolar.so +0 -0
- data/ext/oso-oso/lib/polar.dll +0 -0
- data/lib/oso/polar/data/adapter/active_record_adapter.rb +2 -1
- data/lib/oso/polar/query.rb +2 -2
- data/lib/oso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d5e4e44704e01c32dc47f6009c01079a800806b
|
4
|
+
data.tar.gz: 61840b935d76f9724b6a1a0539b7bf892bbbb6a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6482e63369a4afef61a87dae22534b884e9740b225b2c711bf836deaec96b201bac4a357c8a09229482409d8c0a16a29009c64b0a385d20add2c03499987e1b2
|
7
|
+
data.tar.gz: 984481b3655633994cbbf27ad13622833ce867d10cfedc62b44f3abc250f595bdd9ca02ebb978056d4f564297794927ba61311d448c59e2f4b35e13cf7b8cf98
|
data/Gemfile.lock
CHANGED
Binary file
|
data/ext/oso-oso/lib/libpolar.so
CHANGED
Binary file
|
data/ext/oso-oso/lib/polar.dll
CHANGED
Binary file
|
@@ -10,8 +10,9 @@ module Oso
|
|
10
10
|
types = filter.types
|
11
11
|
query = filter.relations.reduce(filter.model.all) do |q, rel|
|
12
12
|
rec = types[rel.left].fields[rel.name]
|
13
|
+
join_type = rec.kind == 'one' ? 'LEFT' : 'INNER'
|
13
14
|
q.joins(
|
14
|
-
"
|
15
|
+
"#{join_type} JOIN #{rel.right.table_name} ON " \
|
15
16
|
"#{rel.left.table_name}.#{rec.my_field} = " \
|
16
17
|
"#{rel.right.table_name}.#{rec.other_field}"
|
17
18
|
)
|
data/lib/oso/polar/query.rb
CHANGED
@@ -263,9 +263,9 @@ module Oso
|
|
263
263
|
res = host.adapter.execute_query host.adapter.build_query(filter)
|
264
264
|
|
265
265
|
if rel.kind == 'one'
|
266
|
-
raise "multiple parents: #{res}"
|
266
|
+
raise "multiple parents: #{res}" if res.length > 1
|
267
267
|
|
268
|
-
res = res[0]
|
268
|
+
res = res[0] if res.length == 1
|
269
269
|
end
|
270
270
|
|
271
271
|
call_result(host.to_polar(res), call_id: call_id)
|
data/lib/oso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oso-oso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oso Security, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|