vapor / fluent-kit

Swift ORM (queries, models, and relations) for NoSQL and SQL databases
MIT License
217 stars 116 forks source link

SchemaBuilder functions with @discardableResult #525

Closed dmonagle closed 2 years ago

dmonagle commented 2 years ago

Added @discardableResult to all functions in SchemaBuilder that modify Self and return Self. This brings it in line with QueryBuilder and also allows more complicated migrations that use conditional logic (ie not chained) to work without having to use let _ = to avoid Result of call to 'xxx' is unused warnings.

codecov-commenter commented 2 years ago

Codecov Report

Merging #525 (d9b32a2) into main (a5360d8) will increase coverage by 2.90%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
+ Coverage   42.03%   44.94%   +2.90%     
==========================================
  Files         112      101      -11     
  Lines        6280     5765     -515     
==========================================
- Hits         2640     2591      -49     
+ Misses       3640     3174     -466     
Flag Coverage Δ
unittests 44.94% <ø> (+2.90%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
Sources/FluentKit/Schema/SchemaBuilder.swift 67.88% <ø> (ø)
Sources/FluentBenchmark/SolarSystem/Planet.swift
Sources/FluentBenchmark/SolarSystem/Star.swift
Sources/FluentBenchmark/SolarSystem/Moon.swift
Sources/FluentBenchmark/FluentBenchmarker.swift
Sources/FluentBenchmark/SolarSystem/Galaxy.swift
...ntBenchmark/SolarSystem/GalacticJurisdiction.swift
Sources/FluentBenchmark/SolarSystem/Tag.swift
Sources/FluentBenchmark/SolarSystem/Governor.swift
...rces/FluentBenchmark/SolarSystem/SolarSystem.swift
... and 2 more