Closed bannzai closed 5 years ago
sqlboiler --version
$ sqlboiler --version SQLBoiler v3.4.0
Hi, I have a question. How to get information for complex unique key and complex primary key from sqlboiler?
complex unique key
complex primary key
I want to use complex unique key and primary key informations. But I do not found these information from mysql-driver and Table struct.
Here is an example mysql Create Tables SQL for my question. So, I want to extract user_id and hash paris from sqlboiler. (like { .UniqueInfos })
mysql Create Tables SQL
CREATE TABLE `user_id_hash` ( `user_id` int(10) unsigned NOT NULL, `hash` varchar(32) NOT NULL, `name` varchar(40) DEFAULT NULL, `created_at` datetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL, PRIMARY KEY (`user_id`,`hash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
Thank you.
It's in the PrimaryKey part of the Table struct you linked. As for compound unique keys, we don't deal with those at the moment and so sqlboiler has no accounting of it.
What version of SQLBoiler are you using (
sqlboiler --version
)?Question
Hi, I have a question. How to get information for
complex unique key
andcomplex primary key
from sqlboiler?I want to use complex unique key and primary key informations. But I do not found these information from mysql-driver and Table struct.
Here is an example
mysql Create Tables SQL
for my question. So, I want to extract user_id and hash paris from sqlboiler. (like { .UniqueInfos })Thank you.