rom-sql 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e459278c95be56ea5da82ea6c6fec9a5bbc443f0865832cea04d3b1b56fbf5a
4
- data.tar.gz: fa89dd7f60db5748c69eb85f804a1f2a9076ccfb22828e7dd9c27a7611c5bc2a
3
+ metadata.gz: 9ca5db918213ed1a81ec7e5b526849393a4f6223cb4107a2ee1ea54cc6148b81
4
+ data.tar.gz: e1742760f02aad6e90025742b3d8d91c2f52d94e495b398e4886431b82d61a71
5
5
  SHA512:
6
- metadata.gz: 9496cf5afbb38f14782b9104ce05519b2b35674a6fe1ad799f9f34a7f717ad67f4bb79063720818159ff723789bf15e823f55a3d350e7fb30ab6c93607fb8807
7
- data.tar.gz: 7a39e507a4ee369e45693d835a47852b2ccad837251b4b426e41496f63650dccd05038eb4dd47126f88b023e1b49a5fae4a2e4ad7af3745f43fd69c6b31f5142
6
+ metadata.gz: 73d5948cbae27d6032552805bcad6365d52c18784d0cfeb86391890e89de9d5902c4154898ab96bfc32481aec8e5e6f555febc38faecd8983163a0902897b4ad
7
+ data.tar.gz: 7ada4412f647ff39c116044320bdb253fcebc5696caed50cb8158e1be8f440d221af2b601708f1fc06297e818c1e1e1af61d0fbeaa8bb9c949d87f7df7d9aca9
@@ -1,3 +1,11 @@
1
+ ## 3.0.1 2019-05-05
2
+
3
+ ### Fixed
4
+
5
+ * Using joins with a relation object as the target and a block-based conditions produces correct query now (issue #331) (solnic)
6
+
7
+ [Compare v3.0.0...v3.0.1](https://github.com/rom-rb/rom-sql/compare/v3.0.0...v3.0.1)
8
+
1
9
  ## 3.0.0 2019-04-24
2
10
 
3
11
  ### Added
data/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
  [travis]: https://travis-ci.org/rom-rb/rom-sql
3
3
  [codeclimate]: https://codeclimate.com/github/rom-rb/rom-sql
4
4
  [inchpages]: http://inch-ci.org/github/rom-rb/rom-sql
5
+ [chat]: https://rom-rb.zulipchat.com
5
6
 
6
- # rom-sql
7
+ # rom-sql [![Join the chat at https://rom-rb.zulipchat.com](https://img.shields.io/badge/rom--rb-join%20chat-942283.svg)][chat]
7
8
 
8
9
  [![Gem Version](https://badge.fury.io/rb/rom-sql.svg)][gem]
9
10
  [![Build Status](https://travis-ci.org/rom-rb/rom-sql.svg?branch=master)][travis]
@@ -1048,9 +1048,11 @@ module ROM
1048
1048
  # @api private
1049
1049
  def __join__(type, other, join_cond = EMPTY_HASH, opts = EMPTY_HASH, &block)
1050
1050
  if other.is_a?(Symbol) || other.is_a?(ROM::Relation::Name)
1051
- if join_cond.empty?
1051
+ if join_cond.equal?(EMPTY_HASH) && !block
1052
1052
  assoc = associations[other]
1053
1053
  assoc.join(type, self)
1054
+ elsif block
1055
+ __join__(type, other, JoinDSL.new(schema).(&block), opts)
1054
1056
  else
1055
1057
  new(dataset.__send__(type, other.to_sym, join_cond, opts, &block))
1056
1058
  end
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  module SQL
3
- VERSION = '3.0.0'.freeze
3
+ VERSION = '3.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-24 00:00:00.000000000 Z
11
+ date: 2019-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel