Skip to content

Commit 984bde8

Browse files
committed
Using spaces instead of tabs
1 parent 78733c1 commit 984bde8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/content/docs/durable-objects/api/sqlite-storage-api.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ The following code snippet shows you how to store and retrieve data using the Du
2828
<TypeScriptExample>
2929
```ts
3030
export class Counter extends DurableObject {
31-
constructor(ctx: DurableObjectState, env: Env) {
32-
super(ctx, env);
33-
}
31+
constructor(ctx: DurableObjectState, env: Env) {
32+
super(ctx, env);
33+
}
3434

3535
async increment(): Promise<number> {
36-
let value: number = (await this.ctx.storage.get('value')) || 0;
37-
value += 1;
38-
await this.ctx.storage.put('value', value);
39-
return value;
36+
let value: number = (await this.ctx.storage.get('value')) || 0;
37+
value += 1;
38+
await this.ctx.storage.put('value', value);
39+
return value;
4040
}
4141

4242
}
@@ -114,9 +114,9 @@ let cursor = this.sql.exec("SELECT * FROM artist ORDER BY artistname ASC;");
114114
let rawResult = cursor.raw().next();
115115

116116
if (!rawResult.done) {
117-
console.log(rawResult.value); // prints [ 123, 'Alice' ]
117+
console.log(rawResult.value); // prints [ 123, 'Alice' ]
118118
} else {
119-
// query returned zero results
119+
// query returned zero results
120120
}
121121

122122
console.log(cursor.toArray()); // prints [{ artistid: 456, artistname: 'Bob' },{ artistid: 789, artistname: 'Charlie' }]

0 commit comments

Comments
 (0)