Skip to content

Instantly share code, notes, and snippets.

@asim
Created February 8, 2022 12:11
Show Gist options
  • Save asim/f9dcb86b71e9726e881d24191b6100d8 to your computer and use it in GitHub Desktop.
Save asim/f9dcb86b71e9726e881d24191b6100d8 to your computer and use it in GitHub Desktop.

Revisions

  1. asim created this gist Feb 8, 2022.
    11 changes: 11 additions & 0 deletions interface.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    type Db interface {
    Count(*CountRequest) (*CountResponse, error)
    Create(*CreateRequest) (*CreateResponse, error)
    Delete(*DeleteRequest) (*DeleteResponse, error)
    DropTable(*DropTableRequest) (*DropTableResponse, error)
    ListTables(*ListTablesRequest) (*ListTablesResponse, error)
    Read(*ReadRequest) (*ReadResponse, error)
    RenameTable(*RenameTableRequest) (*RenameTableResponse, error)
    Truncate(*TruncateRequest) (*TruncateResponse, error)
    Update(*UpdateRequest) (*UpdateResponse, error)
    }