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

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)

Shopify Partner
5 0 5

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.