This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ software that would otherwise infringe either the contributor's
20
20
copyright in it.
21
21
22
22
1. You must limit use of this software in any manner primarily
23
- intended for commercial advantage or private monetary compensation
24
- to the count of user limit.
23
+ intended for commercial advantage or private monetary compensation.
25
24
This limit does not apply to use in developing feedback or extensions
26
25
that you contribute back to those giving this license.
27
26
Original file line number Diff line number Diff line change
1
+ // Copyright 2021 Gitploy.IO Inc. All rights reserved.
2
+ // Use of this source code is governed by the Gitploy Non-Commercial License
3
+ // that can be found in the LICENSE file.
4
+
5
+ // +build !oss
6
+
1
7
package main
2
8
3
9
import (
Original file line number Diff line number Diff line change
1
+ // +build oss
2
+
3
+ package main
4
+
5
+ import (
6
+ "fmt"
7
+
8
+ "entgo.io/ent/dialect"
9
+ "github.com/gitploy-io/gitploy/ent"
10
+ )
11
+
12
+ func OpenDB (driver string , dsn string ) (* ent.Client , error ) {
13
+ if driver != dialect .SQLite {
14
+ return nil , fmt .Errorf ("The community edition support sqlite only." )
15
+ }
16
+
17
+ return ent .Open (driver , dsn )
18
+ }
You can’t perform that action at this time.
0 commit comments