Skip to content

Commit

Permalink
Attaching Trailer-specific flags to TrailerQL Node
Browse files Browse the repository at this point in the history
  • Loading branch information
ptsochantaris committed Jul 16, 2023
1 parent 455d497 commit 71f46e6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 87 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ profile
*.moved-aside
DerivedData
.idea/
Trailer.xcodeproj/xcuserdata
53 changes: 53 additions & 0 deletions Shared/GraphQL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,59 @@ import Lista
import NIOCore
import TrailerQL

extension Node {
var creationSkipped: Bool {
get {
return flags & 0b00000001 != 0
}
set {
if newValue {
flags |= 0b00000001
} else {
flags &= 0b11111110
}
}
}
var created: Bool {
get {
return flags & 0b00000010 != 0
}
set {
if newValue {
flags |= 0b00000010
} else {
flags &= 0b11111101
}
}
}

var updated: Bool {
get {
return flags & 0b00000100 != 0
}
set {
if newValue {
flags |= 0b00000100
} else {
flags &= 0b11111011
}
}
}

var forcedUpdate: Bool {
get {
return flags & 0b00001000 != 0
}
set {
if newValue {
flags |= 0b00001000
} else {
flags &= 0b11110111
}
}
}
}

@MainActor
enum GraphQL {
static func setup() {
Expand Down

This file was deleted.

0 comments on commit 71f46e6

Please sign in to comment.