Skip to content

Instantly share code, notes, and snippets.

@danielsaul
danielsaul / store.go
Last active October 11, 2018 03:29
Go db store transaction
type Store struct {
q Querier
}
type DB interface {
Querier
Beginx() (*sqlx.Tx, error)
}
type Tx interface {
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import time
import datetime
import urllib
import requests
import json
import sqlite3