Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
C
casbin-pg-adapter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abby Cin
casbin-pg-adapter
Commits
7af908d5
Unverified
Commit
7af908d5
authored
5 years ago
by
anton troyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use model instead of handcrafted SQL query
parent
c36cbae3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
adapter.go
adapter.go
+1
-1
No files found.
adapter.go
View file @
7af908d5
...
@@ -145,7 +145,7 @@ func (r *CasbinRule) String() string {
...
@@ -145,7 +145,7 @@ func (r *CasbinRule) String() string {
func
(
a
*
Adapter
)
LoadPolicy
(
model
model
.
Model
)
error
{
func
(
a
*
Adapter
)
LoadPolicy
(
model
model
.
Model
)
error
{
var
lines
[]
*
CasbinRule
var
lines
[]
*
CasbinRule
if
_
,
err
:=
a
.
db
.
Query
(
&
lines
,
`SELECT * FROM casbin_rules`
);
err
!=
nil
{
if
err
:=
a
.
db
.
Model
(
&
lines
)
.
Select
(
);
err
!=
nil
{
return
err
return
err
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment