idx int64 0 165k | question stringlengths 73 4.15k | target stringlengths 5 918 | len_question int64 21 890 | len_target int64 3 255 |
|---|---|---|---|---|
13,100 | public static void assertEquals ( DataSet expected , DataSet actual ) throws DBAssertionError { DBAssert . dataSetAssertion ( CallInfo . create ( ) , expected , actual ) ; } | Assert that two data sets are equivalent . | 47 | 9 |
13,101 | public static void assertTableExists ( DB db , String tableName ) throws DBAssertionError { DBAssert . assertTableExistence ( CallInfo . create ( ) , db , tableName , true ) ; } | Assert that table exists in the database . | 49 | 9 |
13,102 | public static void assertTableDoesNotExist ( DB db , String tableName ) throws DBAssertionError { DBAssert . assertTableExistence ( CallInfo . create ( ) , db , tableName , false ) ; } | Assert that table does not exist in a database . | 51 | 11 |
13,103 | @ SafeVarargs public static void assertTableExists ( DB db , String ... tableNames ) throws DBAssertionError { multipleTableExistenceAssertions ( CallInfo . create ( ) , db , tableNames , true ) ; } | Assert that tables exist in the database . | 52 | 9 |
13,104 | @ SafeVarargs public static void insert ( DataSet ... dataSets ) { foreach ( dataSets , DBSetup :: insert , CallInfo . create ( ) ) ; } | Insert data sets into the database . | 40 | 7 |
13,105 | @ SafeVarargs public static void update ( DataSet ... dataSets ) { foreach ( dataSets , DBSetup :: update , CallInfo . create ( ) ) ; } | Update database according to given data sets . | 40 | 8 |
13,106 | @ SafeVarargs public static void delete ( DataSet ... dataSets ) { foreach ( dataSets , DBSetup :: delete , CallInfo . create ( ) ) ; } | Delete data sets from the database . | 40 | 7 |
13,107 | @ SafeVarargs public static void populate ( DataSet ... dataSets ) { ensureDistinctDataSources ( dataSets , DataSet :: getSource ) ; foreach ( dataSets , DBSetup :: populate , CallInfo . create ( ) ) ; } | Populate database with given data sets . | 57 | 8 |
13,108 | @ SafeVarargs public static void deleteAll ( Table ... tables ) { foreach ( tables , DBSetup :: deleteAll , CallInfo . create ( ) ) ; } | Delete all data from given tables . | 37 | 7 |
13,109 | @ SafeVarargs public static void truncate ( Table ... tables ) { foreach ( tables , DBSetup :: truncate , CallInfo . create ( ) ) ; } | Truncate tables . | 37 | 5 |
13,110 | @ SafeVarargs public static int execute ( DB db , String sql , Object ... args ) { return DBSetup . execute ( CallInfo . create ( ) , db , sql , args ) ; } | Execute arbitrary SQL for a database instance . | 43 | 9 |
13,111 | @ SafeVarargs public static boolean changed ( DataSource ... dataSources ) { if ( dataSources == null || dataSources . length == 0 ) { throw new InvalidOperationException ( "No data sources specified" ) ; } for ( DataSource ds : dataSources ) { if ( ds . getDirtyStatus ( ) ) { return true ; } } return false ; } | Check if given data sources are seen as changed . | 79 | 10 |
13,112 | public static void dump ( DataSet data , PrintStream out ) { try ( Log log = Log . create ( out ) ) { log . write ( CallInfo . create ( ) , data ) ; } } | Dump the contents of a data set . | 43 | 9 |
13,113 | public static void dump ( DataSource dataSource , PrintStream out ) { try ( Log log = Log . create ( out ) ) { log . write ( CallInfo . create ( ) , executeQuery ( dataSource ) ) ; } } | Dump the database contents for a data source . | 49 | 10 |
13,114 | private static < T > void foreach ( T [ ] arguments , CallHandler < T > handler , CallInfo callInfo ) { if ( arguments == null || arguments . length == 0 ) { throw new InvalidOperationException ( "Empty or null array!" ) ; } for ( T argument : arguments ) { handler . action ( callInfo , argument ) ; } } | Utility method to deal with facade methods that accept variable length arguments . | 75 | 14 |
13,115 | public String serviceName_reverse_POST ( String serviceName , String reverse ) throws IOException { String qPath = "/hosting/reseller/{serviceName}/reverse" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "reverse" , reverse ) ; Str... | Set new reverse to ip | 120 | 5 |
13,116 | public String serviceName_language_POST ( String serviceName , OvhPleskLanguageTypeEnum language ) throws IOException { String qPath = "/hosting/reseller/{serviceName}/language" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "langu... | Change language of the Plesk instance | 128 | 7 |
13,117 | public OvhOvhId serviceName_vendor_ovhId_POST ( String serviceName , OvhVendorObjectTypeEnum objectType , String vendorId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vendor/ovhId" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object >... | Get ovh id from object type | 167 | 7 |
13,118 | public OvhTask serviceName_task_taskId_changeMaintenanceExecutionDate_POST ( String serviceName , Long taskId , Date executionDate ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/task/{taskId}/changeMaintenanceExecutionDate" ; StringBuilder sb = path ( qPath , serviceName , taskId ) ; HashMap < Str... | Change the execution date of a maintenance . Works only if task type is maintenance and if it has not started yet . | 155 | 23 |
13,119 | public OvhTask serviceName_vmEncryption_kms_kmsId_changeProperties_POST ( String serviceName , Long kmsId , String description , String sslThumbprint ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/vmEncryption/kms/{kmsId}/changeProperties" ; StringBuilder sb = path ( qPath , serviceName , kmsId ) ... | Change option user access properties | 185 | 5 |
13,120 | public OvhTask serviceName_user_userId_objectRight_POST ( String serviceName , Long userId , Boolean propagate , OvhRightEnum right , OvhUserObjectRightTypeEnum type , String vmwareObjectId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/user/{userId}/objectRight" ; StringBuilder sb = path ( qPath ... | Add a new object right to user in datacenter on Private Cloud | 209 | 14 |
13,121 | public OvhTask serviceName_user_userId_changeProperties_POST ( String serviceName , Long userId , Boolean canManageIpFailOvers , Boolean canManageNetwork , Boolean canManageRights , String email , String firstName , Boolean fullAdminRo , String lastName , Boolean nsxRight , String phoneNumber , Boolean receiveAlerts , ... | Change Private Cloud user properties | 371 | 5 |
13,122 | public OvhTask serviceName_user_POST ( String serviceName , Boolean canAddRessource , Boolean canManageRights , String email , Date expirationDate , String firstName , String lastName , String name , OvhNetworkRoleEnum networkRole , Boolean nsxRight , String password , String phoneNumber , Boolean receiveAlerts , OvhRi... | Create a new User in your Private Cloud | 413 | 8 |
13,123 | public ArrayList < Long > serviceName_globalTasks_GET ( String serviceName , Long datacenterId , Date endDate_from , Date endDate_to , Date executionDate_from , Date executionDate_to , Long filerId , Long hostId , Date lastModificationDate_from , Date lastModificationDate_to , String name , Long networkAccessId , Long ... | Get filtered tasks associated with this Private Cloud | 447 | 8 |
13,124 | public OvhTask serviceName_federation_activeDirectory_POST ( String serviceName , String baseDnForGroups , String baseDnForUsers , String description , String domainAlias , String domainName , String ip , String password , String username ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/federation/a... | Add a new option user access | 268 | 6 |
13,125 | public OvhTask serviceName_federation_activeDirectory_activeDirectoryId_changeProperties_POST ( String serviceName , Long activeDirectoryId , String description , String password , String username ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/federation/activeDirectory/{activeDirectoryId}/changeP... | Change Active Directory properties | 187 | 4 |
13,126 | public OvhTask serviceName_changeProperties_POST ( String serviceName , String description , Boolean sslV3 , OvhUserAccessPolicyEnum userAccessPolicy , Long userLimitConcurrentSession , OvhUserLogoutPolicyEnum userLogoutPolicy , Long userSessionTimeout ) throws IOException { String qPath = "/dedicatedCloud/{serviceName... | Update this Private Cloud properties . | 255 | 6 |
13,127 | public ArrayList < OvhIpDetails > serviceName_ip_network_details_GET ( String serviceName , String network ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/ip/{network}/details" ; StringBuilder sb = path ( qPath , serviceName , network ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , nul... | List details about this IP Block | 105 | 6 |
13,128 | public OvhTask serviceName_datacenter_POST ( String serviceName , String commercialRangeName , String vrackName ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBo... | Add a new Datacenter in your Private Cloud | 153 | 10 |
13,129 | public net . minidev . ovh . api . dedicatedcloud . host . OvhHourlyConsumption serviceName_datacenter_datacenterId_host_hostId_hourlyConsumption_GET ( String serviceName , Long datacenterId , Long hostId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/host/{hostId}/hourly... | Hourly consumption associated with this host . | 181 | 8 |
13,130 | public ArrayList < OvhProfile > serviceName_datacenter_datacenterId_orderableFilerProfiles_GET ( String serviceName , Long datacenterId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableFilerProfiles" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ... | List available filers in a given Private Cloud Datacenter | 129 | 12 |
13,131 | public net . minidev . ovh . api . dedicatedcloud . disasterrecovery . OvhProfile serviceName_datacenter_datacenterId_disasterRecovery_zerto_state_POST ( String serviceName , Long datacenterId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/zerto/state" ; ... | Get the current state of Zerto deployment on your dedicated Cloud . | 172 | 13 |
13,132 | public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_configureVpn_POST ( String serviceName , Long datacenterId , String preSharedKey , String remoteEndpointInternalIp , String remoteEndpointPublicIp , String remoteVraNetwork , String remoteZvmInternalIp ) throws IOException { String qPath = ... | Configure vpn between your OVH Private Cloud and your onsite infrastructure | 300 | 16 |
13,133 | public OvhTask serviceName_datacenter_datacenterId_disasterRecovery_zertoSingle_enable_POST ( String serviceName , Long datacenterId , String localVraNetwork , String ovhEndpointIp , String remoteVraNetwork ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/disasterRecovery/z... | Enable Zerto replication between your OVH Private Cloud and your onsite infrastructure | 234 | 16 |
13,134 | public OvhTask serviceName_datacenter_datacenterId_vm_vmId_backupJob_restorePoints_restorePointId_restore_POST ( String serviceName , Long datacenterId , Long vmId , Long restorePointId , Long filerId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/rest... | Restore this restore point | 217 | 5 |
13,135 | public OvhTask serviceName_datacenter_datacenterId_vm_vmId_backupJob_enable_POST ( String serviceName , Long datacenterId , Long vmId , OvhBackupDaysEnum [ ] backupDays ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/vm/{vmId}/backupJob/enable" ; StringBuilder sb = path ( ... | Enable backup solution on this virtual Machine | 192 | 7 |
13,136 | public OvhHourlyConsumption serviceName_datacenter_datacenterId_filer_filerId_hourlyConsumption_GET ( String serviceName , Long datacenterId , Long filerId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/filer/{filerId}/hourlyConsumption" ; StringBuilder sb = path ( qPath ... | Hourly consumption associated with this Filer | 155 | 8 |
13,137 | public ArrayList < net . minidev . ovh . api . dedicatedcloud . host . OvhProfile > serviceName_datacenter_datacenterId_orderableHostProfiles_GET ( String serviceName , Long datacenterId ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/orderableHostProfiles" ; StringBuilder... | List available hosts in a given Private Cloud Datacenter | 143 | 11 |
13,138 | public OvhTask serviceName_datacenter_datacenterId_backup_changeProperties_POST ( String serviceName , Long datacenterId , Boolean backupDurationInReport , OvhOfferTypeEnum backupOffer , Boolean backupSizeInReport , Boolean diskSizeInReport , Boolean fullDayInReport , String mailAddress , Boolean restorePointInReport ,... | Edit the backup on a Private Cloud | 336 | 7 |
13,139 | public OvhTask serviceName_datacenter_datacenterId_backup_enable_POST ( String serviceName , Long datacenterId , OvhOfferTypeEnum backupOffer ) throws IOException { String qPath = "/dedicatedCloud/{serviceName}/datacenter/{datacenterId}/backup/enable" ; StringBuilder sb = path ( qPath , serviceName , datacenterId ) ; H... | Enable backup solution on a Private Cloud | 172 | 7 |
13,140 | public ArrayList < OvhZpoolStockProfile > location_pccZone_stock_zpool_GET ( String pccZone , String profileFilter ) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/stock/zpool" ; StringBuilder sb = path ( qPath , pccZone ) ; query ( sb , "profileFilter" , profileFilter ) ; String resp = exec ( ... | Available zpool stock | 123 | 4 |
13,141 | public ArrayList < OvhHostStockProfile > location_pccZone_stock_host_GET ( String pccZone , Long minYear ) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/stock/host" ; StringBuilder sb = path ( qPath , pccZone ) ; query ( sb , "minYear" , minYear ) ; String resp = exec ( qPath , "GET" , sb . to... | Available host stock | 120 | 3 |
13,142 | public ArrayList < OvhPccStockProfile > location_pccZone_stock_pcc_GET ( String pccZone ) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/stock/pcc" ; StringBuilder sb = path ( qPath , pccZone ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t9 ) ; ... | Available PCC stock | 105 | 4 |
13,143 | public void tickets_ticketId_reply_POST ( Long ticketId , String body ) throws IOException { String qPath = "/support/tickets/{ticketId}/reply" ; StringBuilder sb = path ( qPath , ticketId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "body" , body ) ; exec ( qPath , "POST" , s... | Reply to ticket | 107 | 3 |
13,144 | public Boolean tickets_ticketId_canBeScored_GET ( Long ticketId ) throws IOException { String qPath = "/support/tickets/{ticketId}/canBeScored" ; StringBuilder sb = path ( qPath , ticketId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , Boolean . class ) ; } | Checks whether ticket can be scored | 92 | 7 |
13,145 | public ArrayList < OvhMessage > tickets_ticketId_messages_GET ( Long ticketId ) throws IOException { String qPath = "/support/tickets/{ticketId}/messages" ; StringBuilder sb = path ( qPath , ticketId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t1 ) ; } | Get ticket messages | 93 | 3 |
13,146 | public void tickets_ticketId_score_POST ( Long ticketId , String score , String scoreComment ) throws IOException { String qPath = "/support/tickets/{ticketId}/score" ; StringBuilder sb = path ( qPath , ticketId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "score" , score ) ; ... | Set ticket score | 125 | 3 |
13,147 | public ArrayList < Long > tickets_GET ( Boolean archived , OvhTicketCategoryEnum category , Date maxCreationDate , Date minCreationDate , OvhTicketProductEnum product , String serviceName , OvhTicketStatusEnum status , String subject , String ticketNumber ) throws IOException { String qPath = "/support/tickets" ; Strin... | List support tickets identifiers for this service | 248 | 7 |
13,148 | public OvhNewMessageInfo tickets_create_POST ( String body , OvhTicketCategoryEnum category , OvhTicketProductEnum product , String serviceName , OvhTicketSubCategoryEnum subcategory , String subject , OvhTicketTypeEnum type ) throws IOException { String qPath = "/support/tickets/create" ; StringBuilder sb = path ( qPa... | Create a new ticket | 235 | 4 |
13,149 | @ SafeVarargs public final TableBuilder columns ( String ... columns ) { if ( columns == null || columns . length == 0 ) { throw new InvalidOperationException ( "Columns array is null or empty." ) ; } if ( tableColumns != null ) { throw new InvalidOperationException ( "The table columns are already defined." ) ; } tabl... | Set columns . | 86 | 3 |
13,150 | @ SafeVarargs public final TableBuilder key ( String ... columns ) { if ( columns == null || columns . length == 0 ) { throw new InvalidOperationException ( "Columns array is null or empty." ) ; } if ( keyColumns != null ) { throw new InvalidOperationException ( "The key columns are already defined." ) ; } keyColumns =... | Set key columns . | 86 | 4 |
13,151 | public Table build ( DB db ) { if ( tableName == null ) { throw new InvalidOperationException ( "The table name has not been set." ) ; } if ( tableColumns == null ) { tableColumns = ALL_COLUMNS ; } return new Table ( CallInfo . create ( ) , db , tableName , tableColumns , keyColumns ) ; } | Build the table object . | 80 | 5 |
13,152 | protected File gettmpStore ( String nic ) { if ( consumer_key_storage == null || ! consumer_key_storage . isDirectory ( ) ) { if ( e1 == 0 ) { e1 ++ ; log . error ( "No cert directory, can not save consumer_key! please set `consumer_key_storage` variable to a valid directory in your {}, or in your environ variale OVH_C... | storage for previous CK | 132 | 4 |
13,153 | public static void main ( String [ ] args ) throws IOException { ApiOvhCore core = new ApiOvhCore ( ) ; ApiOvhCloud cloud = new ApiOvhCloud ( core ) ; ArrayList < String > projects = cloud . project_GET ( ) ; for ( String project : projects ) { System . out . println ( project ) ; ArrayList < OvhNetwork > networds = cl... | Login using ovh . conf | 192 | 6 |
13,154 | public void serviceName_task_taskId_cancel_POST ( String serviceName , Long taskId ) throws IOException { String qPath = "/dedicated/housing/{serviceName}/task/{taskId}/cancel" ; StringBuilder sb = path ( qPath , serviceName , taskId ) ; exec ( qPath , "POST" , sb . toString ( ) , null ) ; } | this action stop the task progression if it s possible | 91 | 10 |
13,155 | public net . minidev . ovh . api . dedicated . server . OvhTask serviceName_features_backupFTP_POST ( String serviceName ) throws IOException { String qPath = "/dedicated/housing/{serviceName}/features/backupFTP" ; StringBuilder sb = path ( qPath , serviceName ) ; String resp = exec ( qPath , "POST" , sb . toString ( )... | Create a new Backup FTP space | 128 | 6 |
13,156 | public String serviceName_PUT ( String serviceName , OvhCrushTunablesEnum crushTunables , String label ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "crushTunab... | Update cluster details | 148 | 3 |
13,157 | public String serviceName_pool_POST ( String serviceName , String poolName ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}/pool" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "poolName" , poolName ) ; String r... | Create a new ceph pool | 123 | 6 |
13,158 | public String serviceName_user_userName_pool_PUT ( String serviceName , String userName , Boolean classRead , Boolean classWrite , Boolean execute , String poolName , Boolean read , Boolean write ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}/user/{userName}/pool" ; StringBuilder sb = path ( qPath... | Update user - pool permission for single pool | 223 | 8 |
13,159 | public String serviceName_acl_POST ( String serviceName , String [ ] aclList ) throws IOException { String qPath = "/dedicated/ceph/{serviceName}/acl" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "aclList" , aclList ) ; String re... | Create one or more new IP ACLs | 127 | 8 |
13,160 | public ArrayList < OvhTask > serviceName_backupRepository_inventoryName_upgradeQuota_POST ( String serviceName , String inventoryName , Long newQuota ) throws IOException { String qPath = "/veeamCloudConnect/{serviceName}/backupRepository/{inventoryName}/upgradeQuota" ; StringBuilder sb = path ( qPath , serviceName , i... | Change your quota | 162 | 3 |
13,161 | public OvhConsumption serviceName_consumption_GET ( String serviceName , Long duration ) throws IOException { String qPath = "/metrics/{serviceName}/consumption" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "duration" , duration ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; r... | Get consumption for your service | 105 | 5 |
13,162 | public OvhToken serviceName_token_tokenId_GET ( String serviceName , String tokenId ) throws IOException { String qPath = "/metrics/{serviceName}/token/{tokenId}" ; StringBuilder sb = path ( qPath , serviceName , tokenId ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , Ovh... | Get a specific token | 100 | 4 |
13,163 | public OvhToken serviceName_token_tokenId_PUT ( String serviceName , String tokenId , String description ) throws IOException { String qPath = "/metrics/{serviceName}/token/{tokenId}" ; StringBuilder sb = path ( qPath , serviceName , tokenId ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addB... | Modify a token | 135 | 4 |
13,164 | static void insert ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; if ( data . isEmpty ( ) ) { throw new InvalidOperationException ( "Empty data set." ) ; } table . setDirtyStatus ( true ) ; doInsert ( callInfo , table , data ) ; } | Insert a data set onto the database . | 74 | 8 |
13,165 | static void populate ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; table . setDirtyStatus ( true ) ; doPopulate ( callInfo , table , data ) ; } | Populate database with a data set . | 51 | 8 |
13,166 | static void populateIfChanged ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; if ( table . getDirtyStatus ( ) ) { table . setDirtyStatus ( true ) ; doPopulate ( callInfo , table , data ) ; } } | Populate database table with a data set if associated table has changed . | 66 | 14 |
13,167 | private static void doPopulate ( CallInfo callInfo , Table table , DataSet data ) { doDeleteAll ( callInfo , table ) ; doInsert ( callInfo , table , data ) ; table . setSnapshot ( data ) ; } | Auxiliary method to populate a table . | 51 | 9 |
13,168 | private static void doInsert ( CallInfo callInfo , Table table , DataSet data ) { StringBuilder sql = new StringBuilder ( "INSERT INTO " ) ; List < String > tableColumns = table . getColumns ( ) ; int columnCount = tableColumns . size ( ) ; int [ ] paramIdx = new int [ columnCount ] ; int param = 0 ; Iterator < String ... | Utility method to perform actual data insertion . | 253 | 9 |
13,169 | public static void update ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; List < String > keyColumns = table . getKeyColumns ( ) ; if ( keyColumns . isEmpty ( ) ) { throw new InvalidOperationException ( "No key columns defined." ) ; } List < String > tableColumns = table . getCol... | Update rows according to data set . | 490 | 7 |
13,170 | public static void delete ( CallInfo callInfo , DataSet data ) { Table table = asTable ( data . getSource ( ) ) ; List < String > keyColumns = table . getKeyColumns ( ) ; if ( keyColumns . isEmpty ( ) ) { throw new InvalidOperationException ( "No key columns defined." ) ; } List < String > tableColumns = table . getCol... | Delete rows from data set . | 307 | 6 |
13,171 | static int deleteAll ( CallInfo callInfo , Table table ) { table . setDirtyStatus ( true ) ; return doDeleteAll ( callInfo , table ) ; } | Delete all data from table . | 36 | 6 |
13,172 | private static int doDeleteAll ( CallInfo callInfo , Table table ) { DB db = table . getDB ( ) ; return db . access ( callInfo , ( ) -> { String sql = DELETE_FROM_ + table . getName ( ) ; db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { return ws . getStatement ( ) . executeUpdate... | Perform a delete - all operation . | 102 | 8 |
13,173 | static void truncate ( CallInfo callInfo , Table table ) { final DB db = table . getDB ( ) ; db . access ( callInfo , ( ) -> { String sql = "TRUNCATE TABLE " + table . getName ( ) ; table . setDirtyStatus ( true ) ; db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { ws . getStatemen... | Truncate table . | 111 | 5 |
13,174 | static int deleteAll ( CallInfo callInfo , Table table , String where , Object ... args ) { final DB db = table . getDB ( ) ; return db . access ( callInfo , ( ) -> { table . setDirtyStatus ( true ) ; String sql = DELETE_FROM_ + table . getName ( ) + WHERE_ + where ; db . logSetup ( callInfo , sql ) ; try ( WrappedStat... | Delete all data based on a WHERE clause . | 183 | 9 |
13,175 | static void drop ( CallInfo callInfo , DB db , String tableName ) { String sql = String . format ( "DROP TABLE %s" , tableName ) ; db . access ( callInfo , ( ) -> { db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { PreparedStatement dropStmt = ws . getStatement ( ) ; dropStmt . exe... | Drop a table . | 105 | 4 |
13,176 | static int execute ( CallInfo callInfo , DB db , String sql , Object [ ] args ) { return db . access ( callInfo , ( ) -> { db . logSetup ( callInfo , sql ) ; try ( WrappedStatement ws = db . compile ( sql ) ) { PreparedStatement stmt = ws . getStatement ( ) ; if ( args != null && args . length != 0 ) { for ( int i = 0 ... | Execute arbitrary SQL code . | 144 | 6 |
13,177 | public OvhTask serviceName_changeVersion_POST ( String serviceName , OvhAvailableVersionEnum version ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/changeVersion" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addB... | Change the private database engine version | 131 | 6 |
13,178 | public OvhTask serviceName_user_userName_grant_databaseName_update_POST ( String serviceName , String userName , String databaseName , OvhGrantEnum grant ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/user/{userName}/grant/{databaseName}/update" ; StringBuilder sb = path ( qPath , service... | Update user grant | 169 | 3 |
13,179 | public ArrayList < String > serviceName_database_databaseName_extension_GET ( String serviceName , String databaseName , String extensionName , OvhStatus status ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/database/{databaseName}/extension" ; StringBuilder sb = path ( qPath , serviceNam... | Extensions linked to your database | 145 | 6 |
13,180 | public ArrayList < Long > serviceName_dump_GET ( String serviceName , String databaseName , Boolean orphan ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/dump" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "databaseName" , databaseName ) ; query ( sb , "orphan" , orphan... | Dumps available for your private database service | 122 | 8 |
13,181 | public OvhTask serviceName_dump_dumpId_DELETE ( String serviceName , Long dumpId ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/dump/{dumpId}" ; StringBuilder sb = path ( qPath , serviceName , dumpId ) ; String resp = exec ( qPath , "DELETE" , sb . toString ( ) , null ) ; return convertTo... | Delete dump before expiration date | 107 | 5 |
13,182 | public OvhConfiguration serviceName_config_update_POST ( String serviceName , OvhSafeKeyValue < String > [ ] parameters ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/config/update" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , ... | Update the configuration | 138 | 3 |
13,183 | public ArrayList < String > serviceName_whitelist_GET ( String serviceName , String ip , Boolean service , Boolean sftp ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/whitelist" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "ip" , ip ) ; query ( sb , "service" , service... | Whitelist allowed on your privatesql | 143 | 8 |
13,184 | public OvhTask serviceName_whitelist_POST ( String serviceName , String ip , String name , Boolean service , Boolean sftp ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/whitelist" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Ob... | Create a new IP whitelist | 179 | 6 |
13,185 | public ArrayList < OvhAvailableVersionEnum > serviceName_availableVersions_GET ( String serviceName ) throws IOException { String qPath = "/hosting/privateDatabase/{serviceName}/availableVersions" ; StringBuilder sb = path ( qPath , serviceName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; retur... | Get the availables versions for this private database | 95 | 9 |
13,186 | public OvhAvailableOrderCapacities availableOrderCapacities_GET ( OvhOfferEnum offer ) throws IOException { String qPath = "/hosting/privateDatabase/availableOrderCapacities" ; StringBuilder sb = path ( qPath ) ; query ( sb , "offer" , offer ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return c... | Get available order capacitie | 110 | 6 |
13,187 | public ArrayList < OvhDirectAdminOrderConfiguration > orderableVersions_GET ( String ip ) throws IOException { String qPath = "/license/directadmin/orderableVersions" ; StringBuilder sb = path ( qPath ) ; query ( sb , "ip" , ip ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( res... | Get the orderable DirectAdmin versions | 96 | 7 |
13,188 | public String serviceName_confirmTermination_POST ( String serviceName , String commentary , OvhTerminationFutureUseEnum futureUse , OvhTerminationReasonEnum reason , String token ) throws IOException { String qPath = "/license/directadmin/{serviceName}/confirmTermination" ; StringBuilder sb = path ( qPath , serviceNam... | Confirm termination of your service | 187 | 6 |
13,189 | public OvhTask serviceName_changeOs_POST ( String serviceName , OvhDirectAdminOsEnum os ) throws IOException { String qPath = "/license/directadmin/{serviceName}/changeOs" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "os" , os ) ... | Change the Operating System for a license | 131 | 7 |
13,190 | public OvhAsyncTaskArray < OvhBuilding > eligibility_search_buildings_POST ( String streetCode , String streetNumber ) throws IOException { String qPath = "/connectivity/eligibility/search/buildings" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o ... | Get all buildings for a specific address | 144 | 7 |
13,191 | public OvhAsyncTaskArray < OvhLine > eligibility_search_lines_POST ( String ownerName , String streetCode , String streetNumber ) throws IOException { String qPath = "/connectivity/eligibility/search/lines" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBo... | Search for active and inactive lines at an address . It will search for active lines only if the owner name is specified | 160 | 23 |
13,192 | public OvhAsyncTaskArray < OvhCity > eligibility_search_cities_POST ( String zipCode ) throws IOException { String qPath = "/connectivity/eligibility/search/cities" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "zipCode" , zipCode ) ; String re... | Get all localities linked to a zip code | 126 | 9 |
13,193 | public OvhAsyncTask < OvhBuilding > eligibility_search_buildingDetails_POST ( String building ) throws IOException { String qPath = "/connectivity/eligibility/search/buildingDetails" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "building" , bu... | Get the details for a building | 122 | 6 |
13,194 | public OvhAsyncTask < OvhMeetings > eligibility_search_meetings_POST ( String eligibilityReference , String productCode ) throws IOException { String qPath = "/connectivity/eligibility/search/meetings" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( ... | Search for available line creation meeting time slots for copper only | 146 | 11 |
13,195 | public OvhAsyncTaskArray < OvhBuilding > eligibility_search_buildingsByLine_POST ( String lineNumber , OvhLineStatusEnum status ) throws IOException { String qPath = "/connectivity/eligibility/search/buildingsByLine" ; StringBuilder sb = path ( qPath ) ; HashMap < String , Object > o = new HashMap < String , Object > (... | Get building references from a given line number | 150 | 8 |
13,196 | public OvhDomain serviceName_zone_domains_POST ( String serviceName , String domain ) throws IOException { String qPath = "/cdn/website/{serviceName}/zone/domains" ; StringBuilder sb = path ( qPath , serviceName ) ; HashMap < String , Object > o = new HashMap < String , Object > ( ) ; addBody ( o , "domain" , domain ) ... | Configure a domain on CDN | 129 | 7 |
13,197 | public OvhResiliationFollowUpDetail packName_resiliationFollowUp_GET ( String packName ) throws IOException { String qPath = "/pack/xdsl/{packName}/resiliationFollowUp" ; StringBuilder sb = path ( qPath , packName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , OvhResilia... | Get information about the ongoing resiliation | 104 | 7 |
13,198 | public OvhTask packName_domain_services_POST ( String packName , OvhDomainActionEnum action , String authInfo , String domain , String tld ) throws IOException { String qPath = "/pack/xdsl/{packName}/domain/services" ; StringBuilder sb = path ( qPath , packName ) ; HashMap < String , Object > o = new HashMap < String ,... | Activate a domain service | 183 | 5 |
13,199 | public ArrayList < OvhServiceInformation > packName_services_GET ( String packName ) throws IOException { String qPath = "/pack/xdsl/{packName}/services" ; StringBuilder sb = path ( qPath , packName ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t2 ) ; } | Informations about the services included in the pack | 90 | 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.