Is there a way to configure an AutoQuery CommandTimeout?

Can autoquery SQL Command Timeout be set in the DTO or anywhere for that matter?
I don’t see any configuration for that in the plugin properties.

[Route("/Reports/ProgramTypeConflicts", Verbs = "GET")]
[AutoQueryViewer(IconUrl = "octicon:stop",
    Title = "Program Type Conflicts",
    Description = "Entertainment programs with conflicts.")]
public class ProgramTypeConflicts : QueryDb<ProgramTypeConflicts>{ }

Not declaratively on DTOs, you would need to configure OrmLite directly, either globally:

OrmLiteConfig.CommandTimeout = 60;

Or by creating a a custom AutoQuery implementation and resolving & configuring the connection (v5.9+) explicitly, e.g:

public object Any(QueryRockstars query)
{
    using var db = AutoQuery.GetDb(query, base.Request);
    db.SetCommandTimeout(60);
    var q = AutoQuery.CreateQuery(query, base.Request, db);
    return await AutoQuery.Execute(query, q, base.Request, db);
}

Not on 5.9 yet. How about adding a normal endpoint to the autoQuery viewer?

public object Any(ProgramTypeConflicts query)
    {
        using(var db = HostContext.AppHost.GetDbConnection())
        {
            db.SetCommandTimeout(0);
            return db.Select<ProgramTypeConflicts>();
        }
    }

As soon as I remove the return type QueryDb it gets dropped from the viewer.

That’s because AutoQuery Viewer can only view AutoQuery Services & dropping QueryDb<T> makes it a normal Service, i.e. no longer an AutoQuery Service.

FYI the recommended API for resolving a DB Connection from inside a normal Service is:

var db = base.Db;

Thanks for the help. Regarding the base.Db:
In many scenarios we use several database connections for longer running processes (sometimes hours).

We have found that creating and disposing our connections helps with the connection pool and overall performance.

Is this the same as creating a new Connection?

using(var db = base.Db)
        {
            db.SetCommandTimeout(60);
            return db.Select<ProgramTypeConflicts>();
        }

Is base.Db the injected Singleton?

You don’t need using, it gets automatically disposed after the Service is executed, here’s the impl: