...
1 package extension
2
3 import (
4 "database/sql"
5
6 "code.rocketnine.space/tslocum/sriracha"
7 )
8
9 type databaseSQL struct {
10 db *sql.DB
11 }
12
13 var _ sriracha.ExtensionDatabase = &databaseSQL{}
14
15 func DatabaseSQL(driver string, dataSource string) (*databaseSQL, error) {
16 d := &databaseSQL{}
17 var err error
18
19 d.db, err = sql.Open(driver, dataSource)
20 if err != nil {
21 return nil, err
22 }
23
24 return d, nil
25 }
26
27 func (d databaseSQL) Description() string {
28 return "Official SQL database extension"
29 }
30
31 func (d databaseSQL) CreateAccount(account *sriracha.Account) error {
32
33 panic("implement me")
34 }
35
36 func (d databaseSQL) AccountByID(id int) (*sriracha.Account, error) {
37
38 panic("implement me")
39 }
40
41 func (d databaseSQL) AccountByName(name string) (*sriracha.Account, error) {
42
43 panic("implement me")
44 }
45
46 func (d databaseSQL) Accounts() ([]*sriracha.Account, error) {
47
48 panic("implement me")
49 }
50
51 func (d databaseSQL) UpdateAccount(account *sriracha.Account) error {
52
53 panic("implement me")
54 }
55
56 func (d databaseSQL) DeleteAccount(account *sriracha.Account) error {
57
58 panic("implement me")
59 }
60
61 func (d databaseSQL) CreateBan(Ban *sriracha.Ban) error {
62
63 panic("implement me")
64 }
65
66 func (d databaseSQL) BanByID(id int) (*sriracha.Ban, error) {
67
68 panic("implement me")
69 }
70
71 func (d databaseSQL) BanByName(name string) (*sriracha.Ban, error) {
72
73 panic("implement me")
74 }
75
76 func (d databaseSQL) Bans() ([]*sriracha.Ban, error) {
77
78 panic("implement me")
79 }
80
81 func (d databaseSQL) UpdateBan(Ban *sriracha.Ban) error {
82
83 panic("implement me")
84 }
85
86 func (d databaseSQL) DeleteBan(Ban *sriracha.Ban) error {
87
88 panic("implement me")
89 }
90
91 func (d databaseSQL) CreateKeyword(Keyword *sriracha.Keyword) error {
92
93 panic("implement me")
94 }
95
96 func (d databaseSQL) KeywordByID(id int) (*sriracha.Keyword, error) {
97
98 panic("implement me")
99 }
100
101 func (d databaseSQL) KeywordByName(name string) (*sriracha.Keyword, error) {
102
103 panic("implement me")
104 }
105
106 func (d databaseSQL) Keywords() ([]*sriracha.Keyword, error) {
107
108 panic("implement me")
109 }
110
111 func (d databaseSQL) UpdateKeyword(Keyword *sriracha.Keyword) error {
112
113 panic("implement me")
114 }
115
116 func (d databaseSQL) DeleteKeyword(Keyword *sriracha.Keyword) error {
117
118 panic("implement me")
119 }
120
121 func (d databaseSQL) CreateLog(Log *sriracha.Log) error {
122
123 panic("implement me")
124 }
125
126 func (d databaseSQL) LogByID(id int) (*sriracha.Log, error) {
127
128 panic("implement me")
129 }
130
131 func (d databaseSQL) LogByName(name string) (*sriracha.Log, error) {
132
133 panic("implement me")
134 }
135
136 func (d databaseSQL) Logs() ([]*sriracha.Log, error) {
137
138 panic("implement me")
139 }
140
141 func (d databaseSQL) UpdateLog(Log *sriracha.Log) error {
142
143 panic("implement me")
144 }
145
146 func (d databaseSQL) DeleteLog(Log *sriracha.Log) error {
147
148 panic("implement me")
149 }
150
151 func (d databaseSQL) CreatePost(Post *sriracha.Post) error {
152
153 panic("implement me")
154 }
155
156 func (d databaseSQL) PostByID(id int) (*sriracha.Post, error) {
157
158 panic("implement me")
159 }
160
161 func (d databaseSQL) PostByName(name string) (*sriracha.Post, error) {
162
163 panic("implement me")
164 }
165
166 func (d databaseSQL) Posts() ([]*sriracha.Post, error) {
167
168 panic("implement me")
169 }
170
171 func (d databaseSQL) UpdatePost(Post *sriracha.Post) error {
172
173 panic("implement me")
174 }
175
176 func (d databaseSQL) DeletePost(Post *sriracha.Post) error {
177
178 panic("implement me")
179 }
180
181 func (d databaseSQL) CreateReport(Report *sriracha.Report) error {
182
183 panic("implement me")
184 }
185
186 func (d databaseSQL) ReportByID(id int) (*sriracha.Report, error) {
187
188 panic("implement me")
189 }
190
191 func (d databaseSQL) ReportByName(name string) (*sriracha.Report, error) {
192
193 panic("implement me")
194 }
195
196 func (d databaseSQL) Reports() ([]*sriracha.Report, error) {
197
198 panic("implement me")
199 }
200
201 func (d databaseSQL) UpdateReport(Report *sriracha.Report) error {
202
203 panic("implement me")
204 }
205
206 func (d databaseSQL) DeleteReport(Report *sriracha.Report) error {
207
208 panic("implement me")
209 }
210
View as plain text