annotato 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f86532c82d56284833ac644ed9531a0d4b7852ec85f4c0f7b2dedcf431c5f67e
4
- data.tar.gz: 3c4ea34ae82385902ca4afd14ae9be19c0a284ccad62ca398bc903cf772ad29b
3
+ metadata.gz: 31444ce8ea2327e67df7fc73d219416018f135236adb561ecf10462c1884f569
4
+ data.tar.gz: ac1899074e6304e7ff9337515aa82c1c7a16fd58dbc46c9c4f3d63addedf2e48
5
5
  SHA512:
6
- metadata.gz: f63b89990a6d6bdbf9dffdf14e6fe270436ab28f2a2a38671dbdbda98cff8aadf8aeeec778b4c9ba1842eb26974dd01596be2d4add500f109e47fabd53a4fee9
7
- data.tar.gz: c3f7890659e14f9cc9163222aa88c618630c088b3df11c4bb1bd1c83cd442a1b9abd1e1bd52a266ab7cd1f852d800e0e589e6d88eb8b046c5b210186c3396ea7
6
+ metadata.gz: 794851ffb3a9a7fd24e71e6abab64d6df35074cfd21ae06472b2c3855f5ff2f9a309e0936ce6b2dc165de3a8f87da2cde7526711ab870fd52aeada2e217ae751
7
+ data.tar.gz: d086ee9d677cbf5da763b12393d4a25afc5b99141708cf7f038c1209a110739846c13857444c29d1bc1fc7b05d3b8f373770e6aef236bfd09e013c12c3301c2d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- annotato (0.1.12)
4
+ annotato (0.1.13)
5
5
  rails (>= 6.0)
6
6
 
7
7
  GEM
@@ -4,8 +4,10 @@ module Annotato
4
4
  class IndexFormatter
5
5
  def self.format(conn, table_name)
6
6
  conn.indexes(table_name).map do |idx|
7
- cols = Array(idx.columns)
8
- "# #{idx.name} (#{cols.join(', ')})"
7
+ cols_list = Array(idx.columns).join(',')
8
+ unique_clause = idx.unique ? " unique" : ""
9
+ where_clause = idx.where ? " where (#{idx.where})" : ""
10
+ "# #{idx.name} (#{cols_list})#{unique_clause}#{where_clause}"
9
11
  end
10
12
  end
11
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Annotato
4
- VERSION = "0.1.12"
4
+ VERSION = "0.1.13"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: annotato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serhii Bodnaruk
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-12-11 00:00:00.000000000 Z
10
+ date: 2025-12-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails