Coder Social home page Coder Social logo

blocking-slick's Introduction

GitBucket Gitter chat build gitbucket Scala version support License

GitBucket is a Git web platform powered by Scala offering:

  • Easy installation
  • Intuitive UI
  • High extensibility by plugins
  • API compatibility with GitHub

GitBucket

Features

The current version of GitBucket provides many features such as:

  • Public / Private Git repositories (with http/https and ssh access)
  • GitLFS support
  • Repository viewer including an online file editor
  • Issues, Pull Requests and Wiki for repositories
  • Activity timeline and email notifications
  • Account and group management with LDAP integration
  • a Plug-in system

Installation

GitBucket requires Java 11. You have to install it, if it is not already installed.

  1. Download the latest gitbucket.war from the releases page and run it by java -jar gitbucket.war.
  2. Go to http://[hostname]:8080/ and log in with ID: root / Pass: root.

You can also deploy gitbucket.war to a servlet container which supports Servlet 3.0 (like Jetty, Tomcat, JBoss, etc). Note that GitBucket doesn't support Jakarta EE yet.

For more information about installation on Mac or Windows Server (with IIS), or configuration of Apache or Nginx and also integration with other tools or services such as Jenkins or Slack, see Wiki.

To upgrade GitBucket, replace gitbucket.war with the new version, after stopping GitBucket. All GitBucket data is stored in HOME/.gitbucket by default. So if you want to back up GitBucket's data, copy this directory to the backup location.

Plugins

GitBucket has a plug-in system that allows extra functionality. Officially the following plug-ins are provided:

You can find more plugins made by the community at GitBucket community plugins.

Building and Development

If you want to try the development version of GitBucket, or want to contribute to the project, please see the Developer's Guide. It provides instructions on building from source and on setting up an IDE for debugging. It also contains documentation of the core concepts used within the project.

Support

  • If you have any questions about GitBucket, see Wiki and check issues whether there is a same question or request in the past.
  • If you can't find same question and report, send it to our Gitter room before raising an issue.
  • The highest priority of GitBucket is the ease of installation and API compatibility with GitHub, so your feature request might be rejected if they go against those principles.

What's New in 4.41.x

4.41.0 - 18 May 2024

  • Simplify pull request UI
  • Keyword search for issues and pull requests
  • New settings for max files and lines limit in showing diff
  • Adjust the default branch automatically when cloning external repository
  • Fix layout of branch selector
  • Performance improvement for listing branches
  • Upgrade internal libraries

See the change log for all of the updates.

blocking-slick's People

Contributors

altrive avatar dependabot[bot] avatar haya14busa avatar jtjeferreira avatar mrfyda avatar nemoo avatar scala-steward-bot avatar takezoe avatar tarasbilinsky avatar xuwei-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blocking-slick's Issues

Make `insertAll` batch insert

I noticed this TODO in the source code:

// TODO should be batch insert
    def insertAll(values: U*)(implicit s: JdbcBackend#Session): Int = {
      values.map { value => insert(value) }.sum
    }

This is some code I managed to hack together in my own project that seems (???) to work.

 def retManyBatch[U](st: java.sql.Statement, values: Iterable[U], updateCounts: Array[Int]) = {
    var unknown = false
    var count = 0
    for((res, idx) <- updateCounts.zipWithIndex) res match {
      case java.sql.Statement.SUCCESS_NO_INFO => unknown = true
      case java.sql.Statement.EXECUTE_FAILED => throw new SlickException("Failed to insert row #" + (idx+1))
      case i => count += i
    }
    if(unknown) None else Some(count)
  }

  def insertMany[U, C[_]](q: Query[_ ,U, C], values: Seq[U])
                         (implicit s: JdbcBackend#Session): Option[Int] = {
    val compiled = compileInsert(q.toNode)
    val a = compiled.standardInsert
    s.withPreparedStatement(a.sql) { st =>
      st.clearParameters()
      for(value <- values) {
        a.converter.set(value, st)
        st.addBatch()
      }
      val counts = st.executeBatch()
      retManyBatch(st, values, counts)
    }
  }

This is mostly cribbed ad-hoc from the implementation inside Slick's H2DB driver, and shuffled around until things compiled. I have no idea what it's doing but it seems to work!

Not sure what the best way to incorporate this into blocking-slick is.

blocking-slick-33 not published?

Plain sql read

Sorry, This is more of a usage question that an issue.

I want to perform a simple read via plain sql using blocking-slick-32 0.0.8 .
This is what I currently have:

  case class Test(id: Long, name: String)

  def testSql(id: Long)(implicit session: Session): Tuple2[Long, String] = {

    implicit val getTestResult = GetResult(r => Test(r.<<, r.<<))

    sql"""select dep.id, dep.name
      from deployments dep
      where dep.id = $id""".as[(Long, String)]
  }

I get the error

type mismatch;
found : slick.sql.SqlStreamingAction[Vector[(Long, String)],(Long, String),slick.dbio.Effect]
required: (Long, String)

Do you have a hint at what I might be doing wrong?

Support for compiled queries

Nice project! Is there a way to support Compiled queries?

I was trying something like:

implicit class BlockingAppliedCompiledFunction[PU, R <: Rep[_], RU]
    (f: AppliedCompiledFunction[PU, R, RU]) {

  def firstOption(implicit s: JdbcBackend#Session): Option[R] = {
    val invoker = new QueryInvoker[R](f.compiledQuery)
    invoker.firstOption
  }

}

But the type of R is not what I expected. Any clue how to implement this?

Rep[U].run causes MatchError

- when update Account.userName then AccessToken.userName changed *** FAILED ***
  scala.MatchError: First (of class slick.ast.First)
  at slick.driver.JdbcInvokerComponent$QueryInvokerImpl.<init>(JdbcInvokerComponent.scala:25)
  at com.github.takezoe.slick.blocking.BlockingJdbcProfile$QueryInvoker.<init>(BlockingProfile.scala:72)
  at com.github.takezoe.slick.blocking.BlockingJdbcProfile$RepQueryExecutor.<init>(BlockingProfile.scala:63)
  at com.github.takezoe.slick.blocking.BlockingJdbcProfile$class.repToQueryExecutor(BlockingProfile.scala:29)
  at com.github.takezoe.slick.blocking.BlockingH2Driver$.repToQueryExecutor(BlockingDrivers.scala:6)
  at gitbucket.core.service.AccessTokenService$class.generateAccessToken(AccessTokenService.scala:33)
  at gitbucket.core.service.AccessTokenService$.generateAccessToken(AccessTokenService.scala:57)
  at gitbucket.core.service.AccessTokenServiceSpec.gitbucket$core$service$AccessTokenServiceSpec$$$anonfun$16(AccessTokenServiceSpec.scala:70)
  at gitbucket.core.service.AccessTokenServiceSpec.gitbucket$core$service$AccessTokenServiceSpec$$$anonfun$16$adapted(AccessTokenServiceSpec.scala:68)
  at gitbucket.core.service.ServiceSpecBase$class.gitbucket$core$service$ServiceSpecBase$class$$$anonfun$4(ServiceSpecBase.scala:36)
  ...

[QUESTION] - How to include latest version in application?

I've tried various ways to add latest version of this library but didn't have any success. Please suggest how to include latest version.

Ways I tried

"com.github.takezoe" %% "blocking-slick-33" % "0.0.14"
"com.github.takezoe" %% "blocking-slick-33" % "0.0.14-SNAPSHOT"
"com.github.takezoe" %% "blocking-slick-34" % "0.0.14"
"com.github.takezoe" %% "blocking-slick-34" % "0.0.14-SNAPSHOT"

blocking-slick-32 0.0.12 depends on Slick 3.3?

Hi. We're using blocking-slick in our production. Thank you for nice library!

By the way, as this issue title describes, blocking-slick-32 0.0.12 depends on Slick 3.3. (Updated at #37).
I've been believing blocking-slick-32 is for Slick 3.2 (and blocking-slick-31 is for Slick 3.1). Am I misunderstanding naming policy?

Note: Slick 3.3 is announced not to have major API changes in their release news, so practically this change does not cause problems in most cases.

Regression on sum.run

83441b7 introduced an regression on sum.run. This changes was mado to fix a compilation issue with scala 2.10

[error] /home/joao/git/blocking-slick/src/test/scala/com/github/takezoe/slick/blocking/SlickBlockingAPISpec.scala:101: value run is not a member of slick.lifted.Rep[Option[Long]]
[error]       val sum = Users.map(_.id).sum.run
[error]                                     ^
[error] one error found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.