Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify.Session.MySQLSessionStorage() isOnline = 1 ??

Shopify.Session.MySQLSessionStorage() isOnline = 1 ??

OlivierB
Shopify Partner
9 0 1

Hi, I've try tu build an app through the CLI 3.0 and I've changed my session storage to MySQL. Everything enter in my database but i'm wondering why my isOnline field return 1. All the documentation I've found said isOnline is boolean. Why isOnline return int and what is the reference of 1 in this context? Thank you!

Reply 1 (1)

alexrusin
Shopify Partner
5 0 6

MySQL doesn't have built in Boolean type. Instead it uses TINYINT(1) type. MySQL provides BOOLEAN or BOOL type for convince. It is synonym of TINYINT(1). True or false values will be converted to 1 or 0. So, in your case 1 means TRUE.