storage: begin implementing sqlite3 storage
This commit is contained in:
17
storage/sqlite3.go
Normal file
17
storage/sqlite3.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package storage
|
||||
|
||||
import "database/sql"
|
||||
|
||||
func createBlockTable(conn *sql.DB) error {
|
||||
tableCreation := `
|
||||
CREATE TABLE IF NOT EXISTS blocks (
|
||||
height INTEGER,
|
||||
hash TEXT,
|
||||
has_sapling_tx BOOL,
|
||||
compact_encoding BLOB,
|
||||
PRIMARY KEY (height, hash)
|
||||
);
|
||||
`
|
||||
_, err := conn.Exec(tableCreation)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user