![Expectation 1][expect1] ![Expectation 2][expect2]
Download from here:
| db.collection.find( | |
| // where clause | |
| { | |
| items: { $elemMatch : { "code": 3}} | |
| }, | |
| // projection fields | |
| { | |
| _id: "_id", | |
| order_id: "order_id" | |
| // return matched status |
| #MySQL 5.7.12 | |
| #please drop objects you've created at the end of the script | |
| #or check for their existance before creating | |
| #'\\' is a delimiter | |
| #select version() as 'mysql version'; | |
| \\ | |
| set @ids := '3,1'; | |
| \\ | |
| select @ids; |
| -- MySQL Script generated by MySQL Workbench | |
| -- Tue Mar 27 13:09:38 2018 | |
| -- Model: New Model Version: 1.0 | |
| -- MySQL Workbench Forward Engineering | |
| SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; | |
| SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; | |
| SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; | |
| -- ----------------------------------------------------- |
| package main | |
| import "fmt" | |
| func main() { | |
| fmt.Println("Even or Odd.") | |
| evenOrOdd() | |
| } | |
| func evenOrOdd() { |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "time" | |
| ) | |
| // Movie doc |
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| type hitung interface { | |
| luas() float64 | |
| keliling() float64 |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <style> | |
| body{ | |
| margin: 0; |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Debug", | |
| "type": "go", | |
| "request": "launch", | |
| "mode": "auto", | |
| "program": "${workspaceFolder}", | |
| "env": {}, |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <link rel="icon" href="favicon.ico"> | |
| <title>NginX</title> | |
| <style> | |
| body{ |