You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest adding one feature. As Signal is already based on SQL why not let user enter SQL queries in search box? If i want to find some some url someone sent my last month in the evening it's hard, because it shows me all urls, but If i open underlying database in SQLCiper and enter:
SELECT body,TIME(DATETIME(ROUND(sent_at/1000),'unixepoch')) as time FROM messages WHERE body LIKE "%www.%.com%" AND time BETWEEN '17:00:00' AND '19:00:00';
Many of users of Signal are IT people so I do believe that this might be useful for them. The way I see it is that current search would look for "selectfrom; " and if your query matches this regex it would go instantly to db.
The text was updated successfully, but these errors were encountered:
async function searchConversations(query, { limit } = {}) {
const rows = await db.all( SELECT json FROM conversations WHERE ( id LIKE $id OR name LIKE $name OR profileName LIKE $profileName ) ORDER BY active_at DESC LIMIT $limit,
{
$id: %${query}%,
$name: %${query}%,
$profileName: %${query}%,
$limit: limit || 100,
}
);
it simple needs to check against regex and if it matches pass bare query string, for eg. that way:
async function searchConversations(query, { limit } = {}) {
var re=/select\s+\S*\s+from/;
if (query.match(re)!=NULL)
const rows = await db.all(query);
else
const rows = await db.all( SELECT json FROM conversations WHERE ( id LIKE $id OR name LIKE $name OR profileName LIKE $profileName ) ORDER BY active_at DESC LIMIT $limit,
{
$id: %${query}%,
$name: %${query}%,
$profileName: %${query}%,
$limit: limit || 100,
}
);
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I suggest adding one feature. As Signal is already based on SQL why not let user enter SQL queries in search box? If i want to find some some url someone sent my last month in the evening it's hard, because it shows me all urls, but If i open underlying database in SQLCiper and enter:
SELECT body,TIME(DATETIME(ROUND(sent_at/1000),'unixepoch')) as time FROM messages WHERE body LIKE "%www.%.com%" AND time BETWEEN '17:00:00' AND '19:00:00';
Many of users of Signal are IT people so I do believe that this might be useful for them. The way I see it is that current search would look for "selectfrom; " and if your query matches this regex it would go instantly to db.
The text was updated successfully, but these errors were encountered: