1
00:00:05,760 --> 00:00:07,170
In the previous video,

2
00:00:07,170 --> 00:00:10,750
we saw an easy way to check the data in our database tables.

3
00:00:10,750 --> 00:00:12,090
So now what we're gonna do is change

4
00:00:12,090 --> 00:00:15,440
our accounts class to update the balance columns

5
00:00:15,440 --> 00:00:17,730
and instal the transaction details,

6
00:00:17,730 --> 00:00:19,880
which from now on are called history

7
00:00:19,880 --> 00:00:21,990
or are called the history.

8
00:00:21,990 --> 00:00:23,730
So, if we actually run this again,

9
00:00:23,730 --> 00:00:26,000
I know we did run it at the end of the last video,

10
00:00:26,000 --> 00:00:28,400
but if we run it again and see the balance for John there

11
00:00:28,400 --> 00:00:31,070
balance on account John has ten dollars.

12
00:00:31,070 --> 00:00:32,810
Well that's not actually correct.

13
00:00:32,810 --> 00:00:36,980
And if we go over to our database viewer and check that out,

14
00:00:38,850 --> 00:00:41,230
we can see that on the database,

15
00:00:41,230 --> 00:00:44,530
we've got John showing a balance of zero.

16
00:00:44,530 --> 00:00:46,100
So there's a couple things we need to do here

17
00:00:46,100 --> 00:00:48,350
in the deposit and withdrawal methods.

18
00:00:48,350 --> 00:00:51,380
What we need to do is create an entry in the history table.

19
00:00:51,380 --> 00:00:53,880
And I'll just close this down.

20
00:00:56,640 --> 00:00:58,810
So I create an entry in the history table

21
00:00:58,810 --> 00:01:01,410
each time a deposit or withdrawal is made.

22
00:01:01,410 --> 00:01:03,140
And we need to update the account balance

23
00:01:03,140 --> 00:01:05,500
in the accounts table as well.

24
00:01:05,500 --> 00:01:09,220
Now, if one of these updates succeeds but the other fails,

25
00:01:09,220 --> 00:01:12,200
then our database would be in an inconsistent state.

26
00:01:12,200 --> 00:01:14,310
So this is one time when we need to make sure

27
00:01:14,310 --> 00:01:16,320
that all updates are performed

28
00:01:16,320 --> 00:01:18,690
or roll back all the updates.

29
00:01:18,690 --> 00:01:20,160
So I want to start by adding the code

30
00:01:20,160 --> 00:01:22,510
to update the two database tables.

31
00:01:22,510 --> 00:01:24,760
And then we're gonna look at how to cause an error

32
00:01:24,760 --> 00:01:28,400
so that we can roll back the transaction if necessary.

33
00:01:28,400 --> 00:01:31,920
All right, so let's start with the deposit method.

34
00:01:31,920 --> 00:01:35,020
And what we're going to do is remove this line here.

35
00:01:35,020 --> 00:01:35,960
We'll comment it out.

36
00:01:35,960 --> 00:01:36,790
Or actually we'll delete it,

37
00:01:36,790 --> 00:01:39,950
because we're gonna replace it anyway.

38
00:01:39,950 --> 00:01:43,700
And we're going to do: new underscore balance

39
00:01:44,570 --> 00:01:47,820
is equal to self dot underscore balance

40
00:01:49,450 --> 00:01:50,450
plus amount.

41
00:01:52,770 --> 00:01:53,690
And next, we're gonna do:

42
00:01:53,690 --> 00:01:55,610
deposit underscore time

43
00:01:57,180 --> 00:01:59,290
is equal to P-Y-T-Z

44
00:01:59,290 --> 00:02:00,870
dot U-T-C

45
00:02:02,300 --> 00:02:03,300
dot localise

46
00:02:05,470 --> 00:02:08,970
And it's gonna be datetime.datetime.utcnow

47
00:02:11,710 --> 00:02:13,350
parentheses.

48
00:02:13,350 --> 00:02:14,180
And we're getting an error there,

49
00:02:14,180 --> 00:02:16,290
but we'll fix that shortly.

50
00:02:16,290 --> 00:02:18,460
And next line, db.execute.

51
00:02:20,020 --> 00:02:21,930
It's going to be UPDATE

52
00:02:24,590 --> 00:02:25,420
accounts

53
00:02:26,780 --> 00:02:27,690
SET balance

54
00:02:28,900 --> 00:02:30,920
is equal to question mark

55
00:02:30,920 --> 00:02:33,600
WHERE space, and then, in parentheses,

56
00:02:33,600 --> 00:02:36,190
name is equal to question mark.

57
00:02:37,830 --> 00:02:41,320
And then we want to provide new underscore balance.

58
00:02:41,320 --> 00:02:43,360
That's the first parameter.

59
00:02:43,360 --> 00:02:46,030
And the second one is self.name.

60
00:02:47,670 --> 00:02:49,650
Then that's the update for the accounts,

61
00:02:49,650 --> 00:02:51,580
but we also need to insert a new transaction

62
00:02:51,580 --> 00:02:54,590
into the history table: db.execute.

63
00:02:54,590 --> 00:02:57,840
That's going to be INSERT INTO history.

64
00:02:59,230 --> 00:03:01,860
VALUES is going to be three,

65
00:03:01,860 --> 00:03:04,940
so we need three question marks here.

66
00:03:06,300 --> 00:03:07,860
And the three parameters are gonna be

67
00:03:07,860 --> 00:03:10,780
deposit underscore time, self.name,

68
00:03:12,620 --> 00:03:14,280
and then the amount.

69
00:03:16,370 --> 00:03:19,190
And we want a db.commit.

70
00:03:19,190 --> 00:03:22,030
Then self dot underscore balance

71
00:03:22,030 --> 00:03:25,140
is now equal to new underscore balance.

72
00:03:25,140 --> 00:03:29,180
And we can leave the print on line 34 as is.

73
00:03:29,180 --> 00:03:31,100
All right, so what have we actually done here?

74
00:03:31,100 --> 00:03:33,100
Well, we started by calculating the balance

75
00:03:33,100 --> 00:03:35,940
into a variable called new_balance

76
00:03:36,870 --> 00:03:39,380
rather than updating the self dot underscore balance

77
00:03:39,380 --> 00:03:40,950
attribute directly.

78
00:03:40,950 --> 00:03:43,360
And that's because we don't want to update that attribute

79
00:03:43,360 --> 00:03:45,840
if the database transaction fails.

80
00:03:45,840 --> 00:03:47,770
So next we get the time of the transaction.

81
00:03:47,770 --> 00:03:49,830
This is on line 29 here.

82
00:03:49,830 --> 00:03:52,340
And this is exactly the same as the code we used

83
00:03:52,340 --> 00:03:54,760
when we created a list of financial transactions

84
00:03:54,760 --> 00:03:56,230
in the last section.

85
00:03:56,230 --> 00:03:58,120
Now, we've got errors here because we need to import

86
00:03:58,120 --> 00:04:00,560
the datetime and P-Y-T-Z modules.

87
00:04:00,560 --> 00:04:01,690
So let's just go ahead and do that now

88
00:04:01,690 --> 00:04:03,610
to remove those errors.

89
00:04:05,590 --> 00:04:06,920
Import datetime.

90
00:04:08,200 --> 00:04:11,610
And also import P-Y-T-Z.

91
00:04:11,610 --> 00:04:14,420
That fixes that error up as you can see.

92
00:04:14,420 --> 00:04:18,959
And next on line 32 and 33 as you can see here,

93
00:04:18,959 --> 00:04:21,350
we're doing the update to the accounts table.

94
00:04:21,350 --> 00:04:23,950
And then we're doing the insert of the new transaction

95
00:04:23,950 --> 00:04:26,190
into our history table.

96
00:04:26,190 --> 00:04:30,490
And remembering to commit on the next line down here,

97
00:04:30,490 --> 00:04:31,930
line 34.

98
00:04:31,930 --> 00:04:35,630
And finally we're updating our underscore balance attribute

99
00:04:35,630 --> 00:04:38,580
now that the transaction's been completed.

100
00:04:38,580 --> 00:04:39,760
All right, so let's just have a look here.

101
00:04:39,760 --> 00:04:41,590
We can run this again.

102
00:04:43,270 --> 00:04:46,860
And if we have a look at our database,

103
00:04:46,860 --> 00:04:48,530
we've now got John showing a balance

104
00:04:48,530 --> 00:04:51,030
of 10 dollars 30 currently,

105
00:04:51,030 --> 00:04:53,060
bearing in mind that we've updated the deposit method

106
00:04:53,060 --> 00:04:54,310
to update the database,

107
00:04:54,310 --> 00:04:57,110
but we haven't updated the withdrawal method yet.

108
00:04:57,110 --> 00:05:00,140
So we need to actually fix that to get this balance correct.

109
00:05:00,140 --> 00:05:02,550
And if we have a look at our history table,

110
00:05:02,550 --> 00:05:05,220
you can see that it's now correctly showing.

111
00:05:05,220 --> 00:05:06,050
There's a history,

112
00:05:06,050 --> 00:05:08,730
there's now a record for each of the three transactions.

113
00:05:08,730 --> 00:05:11,700
And obviously there's not one for withdrawing yet.

114
00:05:11,700 --> 00:05:14,160
And one thing you can do,

115
00:05:14,160 --> 00:05:16,990
you can actually drag these tables

116
00:05:18,730 --> 00:05:20,540
and put them somewhere else.

117
00:05:20,540 --> 00:05:21,830
And it's a little bit hard for me to do

118
00:05:21,830 --> 00:05:23,000
because I'm actually in full screen.

119
00:05:23,000 --> 00:05:24,390
So I won't do it now.

120
00:05:24,390 --> 00:05:26,300
But with the accounts and history table,

121
00:05:26,300 --> 00:05:28,850
we can actually drag those off the tab bar

122
00:05:28,850 --> 00:05:31,500
so that you can view the two tables side by side.

123
00:05:31,500 --> 00:05:35,150
And remember to refresh the contents of the tables

124
00:05:35,150 --> 00:05:36,390
using the circular arrow button.

125
00:05:36,390 --> 00:05:37,600
So you can click on that

126
00:05:37,600 --> 00:05:39,650
and then just sort of review it at any time.

127
00:05:39,650 --> 00:05:41,660
And that's because the view doesn't update automatically.

128
00:05:41,660 --> 00:05:43,890
So what I'll do is I'll just leave these here

129
00:05:43,890 --> 00:05:45,540
and just quickly go through them,

130
00:05:45,540 --> 00:05:47,650
but bearing in mind as we re-run the transactions,

131
00:05:47,650 --> 00:05:50,470
make sure you do actually do the refresh.

132
00:05:50,470 --> 00:05:51,300
All right, so anyway.

133
00:05:51,300 --> 00:05:52,690
Essentially you can see John's balance

134
00:05:52,690 --> 00:05:55,270
is $10.30, or 1,030 in integer,

135
00:05:57,360 --> 00:05:58,790
as an integer value.

136
00:05:58,790 --> 00:06:00,580
And the three transactions are showing correctly

137
00:06:00,580 --> 00:06:02,500
in the history table.

138
00:06:02,500 --> 00:06:04,450
So that bit's working fine.

139
00:06:04,450 --> 00:06:08,090
So the code for the withdrawal method's almost the same.

140
00:06:08,090 --> 00:06:10,710
So we're gonna be writing the time to the database again

141
00:06:10,710 --> 00:06:14,150
using exactly the same code as in the deposit method

142
00:06:14,150 --> 00:06:16,150
to get the current time.

143
00:06:16,150 --> 00:06:18,300
So before we actually go ahead and do that,

144
00:06:18,300 --> 00:06:19,630
I'm gonna add a modified version

145
00:06:19,630 --> 00:06:22,660
of the static current underscore time method

146
00:06:22,660 --> 00:06:23,880
that we used in the last section

147
00:06:23,880 --> 00:06:26,070
to calculate the correct time.

148
00:06:26,070 --> 00:06:28,400
Let me go ahead and do that.

149
00:06:32,650 --> 00:06:36,010
So I'm gonna add it in the account class.

150
00:06:36,010 --> 00:06:38,680
It's going to be: def underscore

151
00:06:40,020 --> 00:06:42,020
current underscore time.

152
00:06:42,890 --> 00:06:46,310
And yes, we need that leading underscore.

153
00:06:46,310 --> 00:06:48,510
And we're gonna return P-Y-T-Z

154
00:06:48,510 --> 00:06:51,170
dot U-T-C dot localise

155
00:06:52,700 --> 00:06:54,790
and datetime dot datetime

156
00:06:57,110 --> 00:06:58,030
dot utcnow.

157
00:07:03,680 --> 00:07:05,030
And I'll just get rid of one of those lines

158
00:07:05,030 --> 00:07:08,570
to keep everything kind of hunky dory.

159
00:07:08,570 --> 00:07:10,840
And we'll also change this.

160
00:07:10,840 --> 00:07:12,220
We can add an annotation there,

161
00:07:12,220 --> 00:07:14,200
'cause it says it can be static:

162
00:07:14,200 --> 00:07:16,950
@staticmethod to keep that happy.

163
00:07:19,270 --> 00:07:21,960
All right, so we'll change now the deposit method

164
00:07:21,960 --> 00:07:25,200
to use that function that we've just created.

165
00:07:25,200 --> 00:07:28,930
So deposit_time is now going to be equal to,

166
00:07:28,930 --> 00:07:30,600
here we're gonna change that to be equal to

167
00:07:30,600 --> 00:07:32,430
account dot underscore

168
00:07:33,790 --> 00:07:35,790
current underscore time.

169
00:07:37,080 --> 00:07:38,880
Okay, so now the withdrawal method.

170
00:07:38,880 --> 00:07:40,910
Let's actually get that working.

171
00:07:40,910 --> 00:07:41,990
So we're gonna do the same here

172
00:07:41,990 --> 00:07:44,530
as we did with the previous method pretty much,

173
00:07:44,530 --> 00:07:46,080
with the deposit method.

174
00:07:46,080 --> 00:07:48,530
So I'm gonna delete that first line.

175
00:07:48,530 --> 00:07:50,180
Delete that.

176
00:07:50,180 --> 00:07:51,870
And, in terms of the code,

177
00:07:51,870 --> 00:07:56,520
we're gonna start with new_balance is equal to

178
00:07:56,520 --> 00:07:59,930
self dot underscore balance minus amount.

179
00:08:02,250 --> 00:08:05,170
Then we're gonna do withdrawal_time

180
00:08:07,020 --> 00:08:10,940
is equal to account dot underscore current_time

181
00:08:12,600 --> 00:08:15,370
to get the current time for our history table.

182
00:08:15,370 --> 00:08:17,750
Then we need our two updates.

183
00:08:17,750 --> 00:08:18,580
We could have copied this,

184
00:08:18,580 --> 00:08:20,460
but I'm just going to type it out again.

185
00:08:20,460 --> 00:08:22,710
UPDATE accounts SET balance

186
00:08:25,410 --> 00:08:28,660
is equal to question mark WHERE,

187
00:08:28,660 --> 00:08:32,330
and name equals question mark in parentheses,

188
00:08:32,330 --> 00:08:36,500
and then the two parameters, new_balance and self.name.

189
00:08:38,990 --> 00:08:42,070
db.execute is going to be INSERT INTO

190
00:08:43,470 --> 00:08:44,300
history

191
00:08:46,330 --> 00:08:47,370
VALUES.

192
00:08:47,370 --> 00:08:49,400
And we're going to insert the three values

193
00:08:49,400 --> 00:08:52,240
like we did in the deposit method.

194
00:08:53,230 --> 00:08:54,060
And this time it's gonna be

195
00:08:54,060 --> 00:08:57,400
withdrawal underscore time, self.name.

196
00:08:57,400 --> 00:08:58,360
And one slight difference here,

197
00:08:58,360 --> 00:08:59,760
we're going to negate the amount,

198
00:08:59,760 --> 00:09:02,260
so it's gonna be minus amount,

199
00:09:03,310 --> 00:09:06,140
db.commit to save the transaction.

200
00:09:07,390 --> 00:09:09,520
And then we're going to update our attribute:

201
00:09:09,520 --> 00:09:10,770
self dot underscore balance

202
00:09:10,770 --> 00:09:13,690
is equal to new underscore balance.

203
00:09:15,830 --> 00:09:17,830
Okay, and fix that typo.

204
00:09:19,010 --> 00:09:20,640
All right, now before I run this code again,

205
00:09:20,640 --> 00:09:23,960
I need to set John's balance in the database back to zero.

206
00:09:23,960 --> 00:09:25,820
So let's go ahead and do that.

207
00:09:25,820 --> 00:09:28,140
So I'm going to just come into here,

208
00:09:28,140 --> 00:09:29,390
make that zero.

209
00:09:30,600 --> 00:09:32,900
And remembering to commit the change as well.

210
00:09:32,900 --> 00:09:34,020
So I've committed that.

211
00:09:34,020 --> 00:09:35,210
And for the history, what we're gonna do

212
00:09:35,210 --> 00:09:38,390
is we're just gonna delete those three transactions.

213
00:09:38,390 --> 00:09:39,860
We're gonna delete those.

214
00:09:39,860 --> 00:09:42,230
And again, I'm gonna make sure those changes are committed.

215
00:09:42,230 --> 00:09:44,170
So now we've got nothing in the history,

216
00:09:44,170 --> 00:09:46,200
there's nothing in the history record if I refresh that.

217
00:09:46,200 --> 00:09:47,330
There's nothing there.

218
00:09:47,330 --> 00:09:49,900
And for accounts, just to make sure we do a refresh,

219
00:09:49,900 --> 00:09:53,900
you can see that we've got a zero balance for John now.

220
00:09:53,900 --> 00:09:55,570
Okay, so in terms of what we've added

221
00:09:55,570 --> 00:09:57,630
to the withdraw method,

222
00:09:57,630 --> 00:10:00,610
you can see that the two methods were almost identical.

223
00:10:00,610 --> 00:10:02,370
And in fact, if we allow negative amounts

224
00:10:02,370 --> 00:10:03,400
for the deposit method,

225
00:10:03,400 --> 00:10:05,480
then really the only difference between them

226
00:10:05,480 --> 00:10:07,730
would be the first condition in each method

227
00:10:07,730 --> 00:10:09,540
and the value returned.

228
00:10:09,540 --> 00:10:11,810
So it probably makes sense to break the common code

229
00:10:11,810 --> 00:10:13,320
out into its own method.

230
00:10:13,320 --> 00:10:15,910
So let's go ahead and do that.

231
00:10:15,910 --> 00:10:18,830
And I'm gonna just come down here after the balance

232
00:10:18,830 --> 00:10:21,690
the show underscore balance method and put it in there.

233
00:10:21,690 --> 00:10:25,520
So def underscore save underscore update self,

234
00:10:27,660 --> 00:10:30,740
and then it's gonna be amount.

235
00:10:30,740 --> 00:10:31,570
Again, we've got an underscore

236
00:10:31,570 --> 00:10:33,270
in front of the save underscore update,

237
00:10:33,270 --> 00:10:35,610
the start of the method name.

238
00:10:35,610 --> 00:10:38,440
And what we're going to do is,

239
00:10:38,440 --> 00:10:40,260
I'm just going to copy and paste five lines

240
00:10:40,260 --> 00:10:42,190
from the deposit method.

241
00:10:42,190 --> 00:10:43,560
And one, two, three, four, five,

242
00:10:43,560 --> 00:10:46,670
basically right up to and including,

243
00:10:46,670 --> 00:10:48,730
well, it's actually six lines, isn't it?

244
00:10:48,730 --> 00:10:50,850
So I'm gonna copy those and paste them directly in here

245
00:10:50,850 --> 00:10:53,180
in the save underscore update,

246
00:10:53,180 --> 00:10:56,630
making sure that we've also got our last balance as well,

247
00:10:56,630 --> 00:10:58,260
self dot underscore balance,

248
00:10:58,260 --> 00:10:59,280
our update in the attribute,

249
00:10:59,280 --> 00:11:00,420
which we are.

250
00:11:00,420 --> 00:11:01,260
So that's fine.

251
00:11:01,260 --> 00:11:02,970
So now that we've actually done that,

252
00:11:02,970 --> 00:11:04,340
the deposit and withdraw methods

253
00:11:04,340 --> 00:11:06,190
can now use this new method

254
00:11:06,190 --> 00:11:08,250
with withdraw passing in a negative amount.

255
00:11:08,250 --> 00:11:10,790
So, we go back up here now to our deposit method.

256
00:11:10,790 --> 00:11:14,810
And what I'm going to do is just comment that out.

257
00:11:14,810 --> 00:11:17,280
Then we just need to make a call

258
00:11:17,280 --> 00:11:19,210
to the new method.

259
00:11:19,210 --> 00:11:22,550
So it's going to be: self dot underscore

260
00:11:23,940 --> 00:11:25,580
save underscore update.

261
00:11:25,580 --> 00:11:27,420
And it's going to be amount.

262
00:11:27,420 --> 00:11:30,010
So we're passing the amount

263
00:11:30,010 --> 00:11:33,180
that was passed ultimately to this method.

264
00:11:33,180 --> 00:11:34,900
And for the withdraw method,

265
00:11:34,900 --> 00:11:37,390
again for now we'll just comment this code out.

266
00:11:37,390 --> 00:11:38,890
And I'm leaving this in, the source,

267
00:11:38,890 --> 00:11:41,930
so that you've got a copy of the original version

268
00:11:41,930 --> 00:11:44,130
just in case you want to play around with it a bit more.

269
00:11:44,130 --> 00:11:45,270
But in this case, we're gonna do:

270
00:11:45,270 --> 00:11:49,490
self dot underscore save underscore update.

271
00:11:49,490 --> 00:11:51,300
But this time it's gonna be minus amount,

272
00:11:51,300 --> 00:11:54,780
'cause we're negating that, 'cause it's a withdrawal.

273
00:11:54,780 --> 00:11:55,730
But everything else should be correct

274
00:11:55,730 --> 00:11:58,690
now that we've actually got that method written.

275
00:11:58,690 --> 00:12:01,140
Now, what might I do just to make this a little bit easier,

276
00:12:01,140 --> 00:12:02,740
is I want to take a copy of that,

277
00:12:02,740 --> 00:12:04,160
paste that there,

278
00:12:05,870 --> 00:12:07,280
and we'll put this above the deposit,

279
00:12:07,280 --> 00:12:09,030
so put it on line 32.

280
00:12:15,570 --> 00:12:16,460
Like so.

281
00:12:16,460 --> 00:12:17,300
Just so we can see it,

282
00:12:17,300 --> 00:12:18,270
because of course that's being called

283
00:12:18,270 --> 00:12:20,490
by these other methods.

284
00:12:20,490 --> 00:12:21,940
All right, and again, just one final point is,

285
00:12:21,940 --> 00:12:24,390
I've marked it as private with the underscore.

286
00:12:24,390 --> 00:12:27,310
This is the same underscore update method

287
00:12:27,310 --> 00:12:30,850
to indicate that it shouldn't be used outside this class.

288
00:12:30,850 --> 00:12:32,810
And so let's go ahead and run this

289
00:12:32,810 --> 00:12:35,150
just to make sure that it works.

290
00:12:35,150 --> 00:12:38,270
And we've actually got an error here.

291
00:12:38,270 --> 00:12:39,110
We just come up here.

292
00:12:39,110 --> 00:12:40,310
It's because I've used self

293
00:12:40,310 --> 00:12:43,200
and I've indicated this is a static method,

294
00:12:43,200 --> 00:12:45,070
but by making sure that it was a static method

295
00:12:45,070 --> 00:12:47,200
of course we haven't got a self anymore.

296
00:12:47,200 --> 00:12:49,510
And if I'd got rid of that,

297
00:12:49,510 --> 00:12:50,710
that would then be valid again.

298
00:12:50,710 --> 00:12:52,880
But in this case, oops,

299
00:12:52,880 --> 00:12:55,700
we actually do want that to be set as a static method,

300
00:12:55,700 --> 00:12:58,800
so consequently the self shouldn't be there.

301
00:12:58,800 --> 00:12:59,780
So okay, we fixed that.

302
00:12:59,780 --> 00:13:01,780
So if we run this again,

303
00:13:02,870 --> 00:13:05,120
we've now got, the updates have gone through,

304
00:13:05,120 --> 00:13:06,350
so you can see there.

305
00:13:06,350 --> 00:13:08,090
But more importantly we want to check the values

306
00:13:08,090 --> 00:13:09,330
of accounts and history,

307
00:13:09,330 --> 00:13:10,940
so note that this again hasn't updated.

308
00:13:10,940 --> 00:13:13,760
We need to refresh, reload.

309
00:13:13,760 --> 00:13:14,590
And now, correctly,

310
00:13:14,590 --> 00:13:17,130
you've got a balance of 1,000 for John now.

311
00:13:17,130 --> 00:13:20,780
And if we do a refresh now on the history table,

312
00:13:20,780 --> 00:13:22,370
we've now got four transactions.

313
00:13:22,370 --> 00:13:24,640
We've got the three that we had previously,

314
00:13:24,640 --> 00:13:28,680
but also the $30 transaction's there as well.

315
00:13:28,680 --> 00:13:31,040
All right, so that seems to be all working fine,

316
00:13:31,040 --> 00:13:32,240
which is great.

317
00:13:32,240 --> 00:13:34,230
So let's move on to the next video.

318
00:13:34,230 --> 00:13:35,540
And in that one, we're going to start looking

319
00:13:35,540 --> 00:13:37,910
at how to retrieve the history data,

320
00:13:37,910 --> 00:13:40,310
specifically the time column.

321
00:13:40,310 --> 00:13:42,680
So see you in the next video.

