[#6812] Added support for SQL Server

This commit is contained in:
lukaseder 2017-12-13 16:47:13 +01:00
parent 4cc1cdb7f7
commit 71841fe14c
6 changed files with 32 additions and 24 deletions

View File

@ -9548,37 +9548,37 @@ public interface DSLContext extends Scope , AutoCloseable {
/**
* Grant a privilege on a table to user or role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantOnStep grant(Privilege privilege);
/**
* Grant privileges on a table to user or role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantOnStep grant(Privilege... privileges);
/**
* Grant privileges on a table to user or role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantOnStep grant(Collection<? extends Privilege> privileges);
/**
* Revoke a privilege on table from user or role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeOnStep revoke(Privilege privilege);
/**
* Revoke privileges on table from user or role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeOnStep revoke(Privilege... privileges);
/**
* Revoke privileges on table from user or role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeOnStep revoke(Collection<? extends Privilege> privileges);
// -------------------------------------------------------------------------

View File

@ -39,6 +39,8 @@ package org.jooq;
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
/**
* The step in the creation of a <code>GRANT</code> statement where the
@ -52,13 +54,13 @@ public interface GrantOnStep {
/**
* Grant a privilege on a table.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantToStep on(Table<?> table);
/**
* Grant a privilege on a table.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantToStep on(Name table);
/**
@ -70,6 +72,6 @@ public interface GrantOnStep {
* escape literals when concatenated into SQL clauses!
*/
@PlainSQL
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantToStep on(String table);
}

View File

@ -39,6 +39,8 @@ package org.jooq;
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
/**
* The step in the creation of a <code>GRANT</code> statement where the
@ -52,18 +54,18 @@ public interface GrantToStep {
/**
* Grant a privilege to a user.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantFinalStep to(User user);
/**
* Grant a privilege to a role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantFinalStep to(Role role);
/**
* Grant a privilege to <code>PUBLIC</code>.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
GrantFinalStep toPublic();
}

View File

@ -39,6 +39,8 @@ package org.jooq;
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
/**
* The step in the creation of a <code>REVOKE</code> statement where the
@ -52,18 +54,18 @@ public interface RevokeFromStep {
/**
* Revoke a privilege from a user.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeFinalStep from(User user);
/**
* Revoke a privilege from a role.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeFinalStep from(Role role);
/**
* Revoke a privilege from <code>PUBLIC</code>.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeFinalStep fromPublic();
}

View File

@ -39,6 +39,8 @@ package org.jooq;
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.POSTGRES;
// ...
/**
* The step in the creation of a <code>REVOKE</code> statement where the
@ -52,13 +54,13 @@ public interface RevokeOnStep {
/**
* Revoke a privilege on a table.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeFromStep on(Table<?> table);
/**
* Revoke a privilege on a table.
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeFromStep on(Name table);
/**
@ -70,6 +72,6 @@ public interface RevokeOnStep {
* escape literals when concatenated into SQL clauses!
*/
@PlainSQL
@Support({ H2 })
@Support({ H2, POSTGRES })
RevokeFromStep on(String table);
}

View File

@ -7885,7 +7885,7 @@ public class DSL {
*
* @see #grant(Collection)
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
public static GrantOnStep grant(Privilege privilege) {
return using(new DefaultConfiguration()).grant(privilege);
}
@ -7911,7 +7911,7 @@ public class DSL {
*
* @see #grant(Collection)
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
public static GrantOnStep grant(Privilege... privileges) {
return using(new DefaultConfiguration()).grant(privileges);
}
@ -7937,7 +7937,7 @@ public class DSL {
*
* @see #grant(Privilege...)
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
public static GrantOnStep grant(Collection<? extends Privilege> privileges) {
return using(new DefaultConfiguration()).grant(privileges);
}
@ -7963,7 +7963,7 @@ public class DSL {
*
* @see #revoke(Collection)
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
public static RevokeOnStep revoke(Privilege privilege) {
return using(new DefaultConfiguration()).revoke(privilege);
}
@ -7989,7 +7989,7 @@ public class DSL {
*
* @see #revoke(Collection)
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
public static RevokeOnStep revoke(Privilege... privileges) {
return using(new DefaultConfiguration()).revoke(privileges);
}
@ -8015,7 +8015,7 @@ public class DSL {
*
* @see #revoke(Privilege...)
*/
@Support({ H2 })
@Support({ H2, POSTGRES })
public static RevokeOnStep revoke(Collection<? extends Privilege> privileges) {
return using(new DefaultConfiguration()).revoke(privileges);
}