{"created":"May, 29 2019 06:17:06 +0000","minLoaderVersion":"","price":"","version":"3.5.10","trial":false,"disableFull":"","category":"","promotionLevel":"","promotionText":"","image":"https://raw.githubusercontent.com/cfsimplicity/lucee-mariadb/main/extension/META-INF/logo.png","id":"F2FA5DB2-0C27-499C-B1171D2D812FDAF9","name":"Lucee MariaDB extension","releaseType":"server","author":"Julian Halliwell (cfsimplicity)","currency":"","description":"# Lucee MariaDB Extension\r\n\r\nThis extension installs the MariaDB Connector/J Type 4 JDBC driver for creating MariaDB data sources in [Lucee Server](http://lucee.org/). It is an alternative to the generic MySQL driver.\r\n\r\n## Installation\r\n\r\n### via Forgebox\r\n\r\n1. In your Lucee Administrator, go to the _Extension > Providers_ page and add `https://forgebox.io` as a New Extension Provider if not already present\r\n2. Go to _Extension > Applications_ and look for _MariaDB_ in the \"Not installed\" section\r\n3. Click the extension and install\r\n\r\n### Manual\r\n\r\n1. Download the the lucee-mariadb.lex file\r\n2. In your Lucee Administrator, go to the Extension > Applications page\r\n3. Under \"Upload new extension\", select the lex file and click \"Upload\" \r\n\r\n## Usage\r\n\r\nOnce installed you can either create datasources in the Lucee Administrator using the newly added \"MariaDB\" type, or you can define them in your Application.cfc as follows:\r\n\r\n```\r\nthis.datasource = {\r\n\tclass: \"org.mariadb.jdbc.Driver\"\r\n\t,connectionString: \"jdbc:mariadb://[hostname]:[port]/[database]?useUnicode=true&characterEncoding=UTF-8\"// and any other required parameters\r\n\t,username: [username]\r\n\t,password: [password]\r\n\t//other options if required\r\n};\r\n```\r\n[More details on defining Lucee datasources](https://docs.lucee.org/guides/cookbooks/datasource-define-datasource.html)\r\n\r\n## Migration from the MySQL driver\r\n\r\nNote that when inserting records into tables with an auto-increment primary key, the MySQL driver returns the new primary key value in two variables in the query result:\r\n```\r\nGENERATED_KEY\r\ngeneratedKey\r\n```\r\nHowever the MariaDB driver returns the value in the following variables:\r\n```\r\ngeneratedKey\r\ninsert_id\r\n```\r\nBefore switching drivers, you should therefore check that your code is using `generatedKey` and **not** `GENERATED_KEY`.\r\n\r\n\r\n## Credits\r\n\r\nInspiration came from [Bruce Kirkpatrick](https://github.com/jetendo).","minCoreVersion":""}