This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package schema | |
import scalikejdbc.{DBSession, WrappedResultSet, SQL} | |
import scala.collection.immutable.ListMap | |
case class FK(name: String, columns: String, referenced_table: String, referenced_columns: String, on_delete: String, on_update: String) | |
abstract class BaseTable(private val _db: String, private val _table: String)(implicit session: DBSession) { | |
def createColumn(meta: Map[String, Option[String]]): Int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
import play.api.db.slick.Config.driver.simple._ | |
import java.sql.Timestamp | |
case class ChartCase(id: Option[Long], title: String, query: String, settings: String, db: String, user: Long, | |
conn: Long, created: Timestamp, team_shared: Boolean = false, public: Boolean = false) | |
class Chart(tag: Tag) extends Table[ChartCase](tag, "charts") { | |
def id = column[Long]("id", O.PrimaryKey, O.AutoInc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"title":"Aglonas novada pašvaldība", | |
"url":"http://www.aglona.lv" | |
}, | |
{ | |
"title":"Aizkraukles novada pašvaldība", | |
"url":"http://www.aizkraukle.lv" | |
}, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.getCollection('users').aggregate( | |
[ | |
{ | |
$group: | |
{ | |
_id: | |
{ | |
month: { $month: "$created" }, | |
year: { $year: "$created" } | |
}, |
OlderNewer