MySQL
Squid は MySQL database に接続し、Squid application の data source として使用できます。
MySQL は Open Source SQL database management system です。Squid では MySQL database と integrate でき、他の database connector と data を join することもできます。
MySQL database を Squid に接続するには、次の step を完了します。
- Squid Console を開き、MySQL と使用する application を選択します。
- Connectors tab をクリックし、次に Available connectors をクリックします。
- MySQL connector を選択します。
- 次の configuration information を入力します。
- Connector ID - 簡潔で connector の識別に役立つ ID を選択します。
- Database endpoint - port number を含む database host。
- MySQL username
- MySQL password - private に保つため、password は Squid Secrets に保存します。
- Database name - 接続する database の name。

connection information を入力したら、"Test Connection" をクリックして connection が正常に機能していることを確認できます。
Database の保護
default では security rule が必要であり、production environment では、security rule なしで connector への access を許可しないことが不可欠です。database data の保護について詳しくは、security rules documentationを参照してください。
Datatype Mapping
次の table は MySQL と Squid 間の datatype mapping を示します。
| MySQL Type | Squid Type |
|---|---|
| bigint | number |
| binary | string |
| bit | string |
| blob | string |
| boolean | boolean |
| char | string |
| date | date |
| datetime | date |
| decimal | number |
| double | number |
| enum | string |
| float | number |
| int | integer |
| json | map or array |
| longblob | string |
| longtext | string |
| mediumblob | string |
| mediumint | integer |
| mediumtext | string |
| set | string |
| smallint | integer |
| text | string |
| time | string |
| timestamp | date |
| tinyblob | string |
| tinyint | integer |
| tinytext | string |
| varbinary | string |
| varchar | string |
| year | number |
Squid で MySQL data を操作する方法については、Client SDK documentationを参照してください。