misc.python.materialize.zippy.sql_server_capabilities

 1# Copyright Materialize, Inc. and contributors. All rights reserved.
 2#
 3# Use of this software is governed by the Business Source License
 4# included in the LICENSE file at the root of this repository.
 5#
 6# As of the Change Date specified in that file, in accordance with
 7# the Business Source License, use of this software will be governed
 8# by the Apache License, Version 2.0.
 9
10
11from materialize.zippy.framework import Capability
12from materialize.zippy.watermarks import Watermarks
13
14
15class SqlServerRunning(Capability):
16    """SQL Server is running in the environment."""
17
18    pass
19
20
21class SqlServerTableExists(Capability):
22    """A table exists on the SQL Server instance."""
23
24    def __init__(self, name: str) -> None:
25        self.name = name
26        self.has_pk: bool | None = None
27        self.watermarks = Watermarks()
28
29    def get_watermarks(self) -> Watermarks:
30        return self.watermarks
class SqlServerRunning(materialize.zippy.framework.Capability):
16class SqlServerRunning(Capability):
17    """SQL Server is running in the environment."""
18
19    pass

SQL Server is running in the environment.

class SqlServerTableExists(materialize.zippy.framework.Capability):
22class SqlServerTableExists(Capability):
23    """A table exists on the SQL Server instance."""
24
25    def __init__(self, name: str) -> None:
26        self.name = name
27        self.has_pk: bool | None = None
28        self.watermarks = Watermarks()
29
30    def get_watermarks(self) -> Watermarks:
31        return self.watermarks

A table exists on the SQL Server instance.

SqlServerTableExists(name: str)
25    def __init__(self, name: str) -> None:
26        self.name = name
27        self.has_pk: bool | None = None
28        self.watermarks = Watermarks()
name
has_pk: bool | None
watermarks
def get_watermarks(self) -> materialize.zippy.watermarks.Watermarks:
30    def get_watermarks(self) -> Watermarks:
31        return self.watermarks