This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// queries | |
query ::= statement ( ";" statement )* | |
statement ::= alter_retention_policy_stmt | | |
create_continuous_query_stmt | | |
create_database_stmt | | |
create_retention_policy_stmt | | |
create_subscription_stmt | | |
create_user_stmt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright 2020 Stuart Carnie | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@available(macOS 10.15, *) | |
extension NSEvent { | |
static func publisher(scope: Publisher.Scope, matching: EventTypeMask) -> Publisher { | |
return Publisher(scope: scope, matching: matching) | |
} | |
public struct Publisher: Combine.Publisher { | |
public enum Scope { | |
case local, global | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place this early in your application's startup process, such as an init | |
let cb: CFNotificationCallback = { (centre: CFNotificationCenter?, observer: UnsafeMutableRawPointer?, name: CFNotificationName?, object: UnsafeRawPointer?, userInfo: CFDictionary?) in | |
print("Notification: ", terminator: "") | |
if let name = name { | |
print("(\(name.rawValue)) ") | |
} else { | |
print() | |
} |
OlderNewer