Skip to content

Instantly share code, notes, and snippets.

@sam-thecoder
Created July 3, 2018 07:53
Show Gist options
  • Save sam-thecoder/93e310dd6c31d3297b4f2b6c3c558164 to your computer and use it in GitHub Desktop.
Save sam-thecoder/93e310dd6c31d3297b4f2b6c3c558164 to your computer and use it in GitHub Desktop.
$ node
> const models = require('../models');
sequelize deprecated String based operators are now deprecated. Please use Symbo
l based operators for better security, read more at http://docs.sequelizejs.com/
manual/tutorial/querying.html#operators node_modules\sequelize\lib\sequelize.js:
242:13
undefined
> Executing (default): CREATE TABLE IF NOT EXISTS `users` (`id` INTEGER PRIMARY
KEY AUTOINCREMENT, `username` VARCHAR(255), `loggedIn` TINYINT(1), `createdAt` D
ATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
Executing (default): PRAGMA INDEX_LIST(`users`)
Executing (default): CREATE TABLE IF NOT EXISTS `messages` (`id` INTEGER PRIMARY
KEY AUTOINCREMENT, `public` TINYINT(1), `to` VARCHAR(255), `messsage` TINYINT(1
), `createdBy` VARCHAR(255), `createdAt` DATETIME, `updatedAt` DATETIME NOT NULL
);
Executing (default): PRAGMA INDEX_LIST(`messages`)
> console.log(models);
Sequelize {
options:
{ dialect: 'sqlite',
dialectModulePath: null,
protocol: 'tcp',
define: {},
query: {},
sync: {},
timezone: '+00:00',
logging: [Function: bound consoleCall],
omitNull: false,
native: false,
replication: false,
ssl: undefined,
pool: {},
quoteIdentifiers: true,
hooks: {},
retry: { max: 5, match: [Array] },
transactionType: 'DEFERRED',
isolationLevel: null,
databaseVersion: 0,
typeValidation: false,
benchmark: false,
operatorsAliases: true,
storage: './db.sqlite' },
config:
{ database: undefined,
username: undefined,
password: null,
host: 'localhost',
port: undefined,
pool: {},
protocol: 'tcp',
native: false,
ssl: undefined,
replication: false,
dialectModulePath: null,
keepDefaultTimezone: undefined,
dialectOptions: undefined },
dialect:
SqliteDialect {
sequelize: [Circular],
connectionManager:
ConnectionManager {
sequelize: [Circular],
config: [Object],
dialect: [Circular],
versionPromise: null,
dialectName: 'sqlite',
pool: [Object],
connections: [Object],
lib: [Object] },
QueryGenerator:
{ options: [Object],
dialect: 'sqlite',
...
typeValidation: undefined } },
queryInterface:
QueryInterface {
sequelize: [Circular],
QueryGenerator:
{ options: [Object],
dialect: 'sqlite',
...
sequelize: [Circular],
typeValidation: undefined } },
models: { user: user, messages: messages },
modelManager: ModelManager { models: [ user, messages ], sequelize: [Circular]
},
connectionManager:
ConnectionManager {
sequelize: [Circular],
config:
{ database: undefined,
username: undefined,
password: null,
host: 'localhost',
port: undefined,
pool: {},
protocol: 'tcp',
native: false,
ssl: undefined,
replication: false,
dialectModulePath: null,
keepDefaultTimezone: undefined,
dialectOptions: undefined },
dialect:
SqliteDialect {
sequelize: [Circular],
connectionManager: [Circular],
QueryGenerator: [Object] },
versionPromise: null,
dialectName: 'sqlite',
pool:
Pool {
domain: [Object],
...
connections: { default: [Object] },
lib:
{ Database: [Function: Database],
Statement: [Function: Statement],
OPEN_READONLY: 1,
OPEN_READWRITE: 2,
OPEN_CREATE: 4,
OPEN_FULLMUTEX: 65536,
VERSION: '3.24.0',
SOURCE_ID: '2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9
566366d5221ac8fb199a87ca',
VERSION_NUMBER: 3024000,
OK: 0,
...
verbose: [Function] } },
importCache: {},
test:
{ _trackRunningQueries: false,
_runningQueries: 0,
trackRunningQueries: [Function: trackRunningQueries],
verifyNoRunningQueries: [Function: verifyNoRunningQueries] } }
undefined
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment