gx0r/connect-session-knex

Feature Request: Add options to specify column names of sessions table

xegulon opened this issue · 0 comments

Hi, I'd like to be able to specify the column names of the sessions table.

In my case, I'd like the expired column to be named expired and the sess column to be named data.

Also, I'd like to have the option to store the expired column as a unix timestamp

For now, it's like this:

 type ConfigType = {
      tablename?: string;
      sidfieldname?: string;
      knex?: Knex;
      createtable?: boolean;
      clearInterval?: number;
      disableDbCleanup?: boolean;
      onDbCleanupError?: (error: Error) => void
    };

I'd like to have:

 type ConfigType = {
      tablename?: string;
      sidfieldname?: string;
      // ADDED
      sessdatafieldname?: string;
      expiredfieldname?: string;
      storeExpiredColumnAsUnix?: boolean;
      // ADDED
      knex?: Knex;
      createtable?: boolean;
      clearInterval?: number;
      disableDbCleanup?: boolean;
      onDbCleanupError?: (error: Error) => void
    };