อาทิตย์, 28 ส.ค. 2016
 
 

SMSKP-PayPal

Donate using PayPal
Amount:
Note:
Note:

PTT Oil Price

Gold Status

SM SKP ADS-1

สมุยสเก็ตอัพ คอมมิวนิตี้
Newsfeeds
Planet MySQL
Planet MySQL - http://www.planetmysql.org/

  • Some thoughts on recent events
    It was suggested by Monty that the posts I've made about MariaDB are for publicity. This simply isn't true. I would have much preferred a different outcome in my interactions with MariaDB. I figured that they would end up giving me a hard time, and I'd be stubborn and we'd both hate each other for as long as I could keep from leaving. A quick separation actually seems much better in such context. Regardless, I would have preferred to speak amicably to the MariaDB Corporation about switching the license back, or at least moving to the new license at the time of the notification of the community, ie as the LAST checkin in the 2.0 branch. I would suggest they re-release 2.0 as GPL and move 2.1 to the BSL to allow the market to decide if they want to move to 2.1, or even take up 2.0, if they aren't guaranteed important (especially security!) fixes in the older branch.If the MariaDB Corporation should choose to stick with the BSL for 2.0, there should be some well document end-of-life policy for each version. For example, important bug fixes for crashes, memory leaks, security issues, etc, will be made in the GPL version for the lifetime of one newer BSL version. In this case, MariaDB would continue to be a good steward of open source by maintaining the products they have released, especially for security problems, while still getting revenue from customers who buy a license in order to get the either the latest or greatest, or to use the product at uh, "maximum scale". [I couldn't resist]I would also amend the license to say that if the MariaDB corporation dissolves or is bought by another entity, the license immediately reverts to GPL.

  • LaraconEU 2016 - Overview
    Last time I went to LaraconEU as in 2014 as speaker in the community track, it was my first international event ever speaking in english and I had jitters from it. A lot a friends were made and it was nice to see all of them again this year. What I also like about LaraconEU it is a Laravel conference that doesn’t talk always about Laravel, being a bit less insular than one would imagine. Shawn McCool and his team made a great job this year and I was very honoured this year to be in the Track #1 (Blue Track). The first round of applauses when I was introducing myself and saying this was my second Laracon made very much emotional and triggered something on my mind: These people are there to soak in the knowledge you have to share, so give your best, and I confess I tried exactly that. The venue was amazing, I don’t have a single complaint to make regarding the staff and the organisers, they made everything possible to make people comfortable and I could see them working hard behind the scenes. The problem is when you are speaking on the second day on a 2 day conference is that you don’t get to get the most out of the other talks that are before yours: insecurity, anxiety, fear, all play a role in there. The talks I saw were really well delivered and you could see by people that “knew their shit” as we were joking around. Also a lot of cheese jokes to break the ice. My only regret is not have seen more of the speakers talk, which I will definitely rectify it as soon as the videos comes out, and have made new friends this years was also awesome, keep in touch! Joind.in: Making the most out of MySQL Slides: Making the most out of MySQL from Gabriela D'Ávila

  • Google Cloud SQL Second Generation is available
    Recently Google announced, that the second generation of Cloud SQL left the beta state and it is available. I decided to take a look, because last time when I checked it, it looked good, but I couldn’t take it seriously because of the nonexistent SLA. I have a few databases running on Amazon RDS, but I don’t […]

  • Develop By Example – Working with custom queries using Node.js
    In all the previous blog posts we covered a lot of examples of how to perform actions in a MySQL server set up as a document store. In all the code examples we used the XSession to communicate to the MySQL server. The XSession is a logical session that abstracts our connection. With it, we can be connected to one or more servers and also give us the required support to work with collections and relational tables. But there is something that the XSession does not provide, full SQL language support. When you need to execute a query that is not supported by an XSession, use a NodeSession instead. The NodeSession object can be useful, for example, when you want to connect to a specific MySQL server and do operations specifically on this server, or when you want to execute a specific function or create a stored procedure. The following example demonstrates how to use a NodeSession object.var mysqlx = require('mysqlx'); mysqlx.getNodeSession({   host: 'host',   port: '33060',   dbUser: 'root',   dbPassword: 'my pass' }).then(function (nodesession) {   nodesession.executeSql("USE mySchema")   .execute()   .then(result => {     nodesession.executeSql("SELECT * FROM myColl LIMIT 1")     .execute(function (result){       console.log(result[0]);       nodesession.close();     });   }).catch(function (err) {     console.log(err.message);     console.log(err.stack);   }); });In the previous example, we use the method getNodeSession to get the NodeSession object (nodesession). Then we call the nodesession objects’s executeSql method to set the schema that we are going to use. To execute the query, we need to call the execute method. When the query that sets the current database completes, it returns a Result object (result) that contains information about the execution of the query. In this instance, the result object does not contain any useful information other than reporting the success or failure of the operation. Then, we call the executeSql method again, setting a query that may return one record. Once the query is executed, a result object is received, but in this case, it contains a row returned from the query represented as an array object. Each item in the array represents a column of a row. We access the array object by indexes to get the information we require, in the code we get the value of the column 0 (index 0) to write it in the console. Of course, the previous example can be accomplished without using a NodeSession object. For that reason, in the next example we are going to create a more complex query that cannot be handled by an XSession object. Suppose that we have a collection where we store the reviews for a movie, and the review contains a rating. We want to get the 10 best rating movies based on the average of the rating that the movie has. Currently, we do not have support to calculate the average using an XSession object, and so for this case, we need a NodeSession. The next example demonstrates how to accomplish what we want.var mysqlx = require('mysqlx'); mysqlx.getNodeSession({   host: 'host',   port: '33060',   dbUser: 'root',   dbPassword: 'my pass' }).then(function (nodesession) {   var query = 'select movie_name from' +   ' (select  JSON_EXTRACT(doc, "$.movie_name")'+   ' as movie_name, round(avg(JSON_EXTRACT(doc,' +   ' "$.rate")), 2) as average from mySchema.reviews' +   ' group by movie_name) as bestrated' +   ' order by average desc limit 10;';   const execSql = nodesession.executeSql(query);   execSql.execute(function (result) {     console.log(result[0]);   })   .catch(function (err) {     console.log(err.message);     console.log(err.stack);   });   nodesession.close(); }).catch(function (err) { console.log(err.message); console.log(err.stack); });In the previous example we get the NodeSession object (nodesession). Then we call the nodesession object’s executeSql method to define the query we want to execute. As you can see in this example, we don’t set the schema we want to use, but specify it in the query (mySchema.reviews). Once the query has executed, we log the results returned to the console and at the end the node session is closed. In the query you can notice that we are using a function called “JSON_EXTRACT”, which is one of the many functions introduced in MySQL Server 5.7 that enable you to create and query JSON documents. For more information about these functions, see the MySQL Reference Guide articles JSON Functions and Manipulation JSON Data. See you in the next blog post.

  • MariaDB 10.0.27 now available
    The MariaDB project is pleased to announce the immediate availability of MariaDB 10.0.27. See the release notes and changelog for details on this release. Download MariaDB 10.0.27 Release Notes Changelog What is MariaDB 10.0? MariaDB APT and YUM Repository Configuration Generator Thanks, and enjoy MariaDB! The post MariaDB 10.0.27 now available appeared first on MariaDB.org.