Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add batch and increment double operation #88

Merged
merged 5 commits into from
Apr 3, 2023
Merged

feat: Add batch and increment double operation #88

merged 5 commits into from
Apr 3, 2023

Conversation

cbaker6
Copy link
Member

@cbaker6 cbaker6 commented Apr 2, 2023

New Pull Request Checklist

Issue Description

Approach

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@cbaker6 cbaker6 marked this pull request as draft April 2, 2023 00:22
@cbaker6
Copy link
Member Author

cbaker6 commented Apr 2, 2023

Still need to fix mix array batch operations

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tailor (reported by Codacy) found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@codecov
Copy link

codecov bot commented Apr 2, 2023

Codecov Report

Merging #88 (8a2ecc1) into main (ad1cad2) will increase coverage by 0.47%.
The diff coverage is 98.31%.

@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   90.50%   90.97%   +0.47%     
==========================================
  Files         169      172       +3     
  Lines       15123    15209      +86     
==========================================
+ Hits        13687    13837     +150     
+ Misses       1436     1372      -64     
Impacted Files Coverage Δ
Sources/ParseSwift/API/API+Command.swift 86.86% <ø> (+0.40%) ⬆️
Sources/ParseSwift/API/BatchUtils.swift 100.00% <ø> (ø)
Sources/ParseSwift/API/Responses.swift 95.00% <ø> (ø)
Sources/ParseSwift/Types/ParseError.swift 100.00% <ø> (ø)
Sources/ParseSwift/Types/Query.swift 90.52% <ø> (+1.89%) ⬆️
...rces/ParseSwift/Protocols/ParseOperationable.swift 90.90% <90.90%> (ø)
Sources/ParseSwift/Types/ParseOperation.swift 99.52% <97.77%> (-0.48%) ⬇️
...thentication/3rd Party/ParseApple/ParseApple.swift 86.25% <100.00%> (ø)
...cation/3rd Party/ParseFacebook/ParseFacebook.swift 100.00% <100.00%> (ø)
...entication/3rd Party/ParseGithub/ParseGitHub.swift 100.00% <100.00%> (ø)
... and 27 more

... and 20 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

An operation that removes a set of objects from a field.
*/
public struct ParseOperationRemove<T>: ParseOperationable where T: Codable {
public var __op: ParseOperationCommand = .remove // swiftlint:disable:this identifier_name

Check warning

Code scanning / Tailor (reported by Codacy)

Variable names should be lowerCamelCase

Variable names should be lowerCamelCase
An operation that removes a set of relations on an array field.
*/
public struct ParseOperationRemoveRelation<T>: ParseRelationOperationable where T: ParseObject {
public var __op: ParseOperationCommand = .removeRelation // swiftlint:disable:this identifier_name

Check warning

Code scanning / Tailor (reported by Codacy)

Variable names should be lowerCamelCase

Variable names should be lowerCamelCase
}

enum CodingKeys: String, CodingKey {
case __op

Check warning

Code scanning / Tailor (reported by Codacy)

Enum case names should be lowerCamelCase

Enum case names should be lowerCamelCase
- note: To append `ParseOperationable` operations of a different type, use `appendOperations()`
after creating an instance of `ParseOperationBatch`.
*/
public init<T>(operations: [T]) where T: ParseOperationable {

Check warning

Code scanning / Tailor (reported by Codacy)

Opening brace should have exactly one space before it

Opening brace should have exactly one space before it
@@ -10,7 +10,7 @@

/// A type used to create internal fields for `ParseSchema`.
public struct ParseField: ParseTypeable {
var __op: Operation? // swiftlint:disable:this identifier_name
var __op: ParseOperationCommand? // swiftlint:disable:this identifier_name

Check warning

Code scanning / Tailor (reported by Codacy)

Variable names should be lowerCamelCase

Variable names should be lowerCamelCase
- note: A field can be incremented/decremented by a positive/negative value.
*/
public struct ParseOperationIncrement: ParseOperationable {
public var __op: ParseOperationCommand = .increment // swiftlint:disable:this identifier_name

Check warning

Code scanning / Tailor (reported by Codacy)

Variable names should be lowerCamelCase

Variable names should be lowerCamelCase
- note: A field can be incremented/decremented by a positive/negative value.
*/
public struct ParseOperationIncrementDouble: ParseOperationable {
public var __op: ParseOperationCommand = .increment // swiftlint:disable:this identifier_name

Check warning

Code scanning / Tailor (reported by Codacy)

Variable names should be lowerCamelCase

Variable names should be lowerCamelCase
@cbaker6 cbaker6 marked this pull request as ready for review April 2, 2023 18:36
@cbaker6 cbaker6 merged commit a790bb7 into main Apr 3, 2023
@cbaker6 cbaker6 deleted the batchOp branch April 3, 2023 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant