Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions snakemake_interface_storage_plugins/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import List


@dataclass
class QueryBase:
"""Base class for structured queries.

By implementing the `to_str` method, subclasses can define how the query
should be represented as a string or list of strings, representing individual
queries.
"""
# TODO determine how to auto-handle to and from str conversion
# how to handle wildcards, and how to handle single queries representing multiple
# individual queries. For the latter, can we use the same type or should we
# use a different type?
def to_str(self) -> List[str]: ...
Loading