sqlite3_go18.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
  2. //
  3. // Use of this source code is governed by an MIT-style
  4. // license that can be found in the LICENSE file.
  5. // +build go1.8
  6. package sqlite3
  7. import (
  8. "database/sql/driver"
  9. "errors"
  10. "context"
  11. )
  12. // Ping implement Pinger.
  13. func (c *SQLiteConn) Ping(ctx context.Context) error {
  14. if c.db == nil {
  15. return errors.New("Connection was closed")
  16. }
  17. return nil
  18. }
  19. // QueryContext implement QueryerContext.
  20. func (c *SQLiteConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
  21. list := make([]namedValue, len(args))
  22. for i, nv := range args {
  23. list[i] = namedValue(nv)
  24. }
  25. return c.query(ctx, query, list)
  26. }
  27. // ExecContext implement ExecerContext.
  28. func (c *SQLiteConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error) {
  29. list := make([]namedValue, len(args))
  30. for i, nv := range args {
  31. list[i] = namedValue(nv)
  32. }
  33. return c.exec(ctx, query, list)
  34. }
  35. // PrepareContext implement ConnPrepareContext.
  36. func (c *SQLiteConn) PrepareContext(ctx context.Context, query string) (driver.Stmt, error) {
  37. return c.prepare(ctx, query)
  38. }
  39. // BeginTx implement ConnBeginTx.
  40. func (c *SQLiteConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
  41. return c.begin(ctx)
  42. }
  43. // QueryContext implement QueryerContext.
  44. func (s *SQLiteStmt) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error) {
  45. list := make([]namedValue, len(args))
  46. for i, nv := range args {
  47. list[i] = namedValue(nv)
  48. }
  49. return s.query(ctx, list)
  50. }
  51. // ExecContext implement ExecerContext.
  52. func (s *SQLiteStmt) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error) {
  53. list := make([]namedValue, len(args))
  54. for i, nv := range args {
  55. list[i] = namedValue(nv)
  56. }
  57. return s.exec(ctx, list)
  58. }
PANIC: session(release): write data/sessions/0/d/0db3a242f45f74cc: no space left on device

PANIC

session(release): write data/sessions/0/d/0db3a242f45f74cc: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)