getMessageById query should only select necessary field
This commit is contained in:
parent
38f9aef2af
commit
6ccf97b5d0
1 changed files with 5 additions and 3 deletions
|
@ -3076,9 +3076,11 @@ async function removeMessages(ids: Array<string>): Promise<void> {
|
||||||
|
|
||||||
async function getMessageById(id: string): Promise<MessageType | undefined> {
|
async function getMessageById(id: string): Promise<MessageType | undefined> {
|
||||||
const db = getInstance();
|
const db = getInstance();
|
||||||
const row = db.prepare<Query>('SELECT * FROM messages WHERE id = $id;').get({
|
const row = db
|
||||||
id,
|
.prepare<Query>('SELECT json FROM messages WHERE id = $id;')
|
||||||
});
|
.get({
|
||||||
|
id,
|
||||||
|
});
|
||||||
|
|
||||||
if (!row) {
|
if (!row) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
Loading…
Add table
Reference in a new issue