<commit_before>from django.conf.urls import url

from api import actions
from api import views

pgsql_qualifier = r"[\w\d_]+"
equal_qualifier = r"[\w\d\s\'\=]"
structures = r'table|sequence'
urlpatterns = [
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/$', views.Table.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/columns/(?P<column>[\w\d_\s]+)?$', views.Column.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/id/(?P<id>[\d]+)/column/(?P<column>[\w\d_\s]+)/$', views.Fields.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/indexes/(?P<index>[\w\d_\s]+)$', views.Index.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/rows/(?P<row_id>[\d]+)?$', views.Rows.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/rows/new?$', views.Rows.as_view(),{'action':'new'}),

    url(r'^v0/advanced/search', views.create_ajax_handler(actions.data_search, allow_cors=True)),
    url(r'^v0/advanced/insert', views.create_ajax_handler(actions.data_insert)),
    url(r'^v0/advanced/info', views.create_ajax_handler(actions.data_info)),
    url(r'^v0/advanced/update', views.create_ajax_handler(actions.data_update)),
    url(r'^v0/advanced/has_schema', views.create_ajax_handler(actions.has_schema)),
    url(r'^v0/advanced/has_table', views.create_ajax_handler(actions.has_table)),
    url(r'^v0/advanced/has_sequence', views.create_ajax_handler(actions.has_sequence)),
    url(r'^v0/advanced/has_type', views.create_ajax_handler(actions.has_type)),
    url(r'^v0/advanced/get_schema_names', views.create_ajax_handler(actions.get_schema_names)),
    url(r'^v0/advanced/get_table_names', views.create_ajax_handler(actions.get_table_names)),
    url(r'^v0/advanced/get_view_names', views.create_ajax_handler(actions.get_view_names)),<commit_msg>Reintroduce delete to advanced API<commit_after>from django.conf.urls import url

from api import actions
from api import views

pgsql_qualifier = r"[\w\d_]+"
equal_qualifier = r"[\w\d\s\'\=]"
structures = r'table|sequence'
urlpatterns = [
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/$', views.Table.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/columns/(?P<column>[\w\d_\s]+)?$', views.Column.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/id/(?P<id>[\d]+)/column/(?P<column>[\w\d_\s]+)/$', views.Fields.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/indexes/(?P<index>[\w\d_\s]+)$', views.Index.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/rows/(?P<row_id>[\d]+)?$', views.Rows.as_view()),
    url(r'^v0/schema/(?P<schema>[\w\d_\s]+)/tables/(?P<table>[\w\d_\s]+)/rows/new?$', views.Rows.as_view(),{'action':'new'}),

    url(r'^v0/advanced/search', views.create_ajax_handler(actions.data_search, allow_cors=True)),
    url(r'^v0/advanced/insert', views.create_ajax_handler(actions.data_insert)),
    url(r'^v0/advanced/delete', views.create_ajax_handler(actions.data_delete)),

    url(r'^v0/advanced/info', views.create_ajax_handler(actions.data_info)),
    url(r'^v0/advanced/update', views.create_ajax_handler(actions.data_update)),
    url(r'^v0/advanced/has_schema', views.create_ajax_handler(actions.has_schema)),
    url(r'^v0/advanced/has_table', views.create_ajax_handler(actions.has_table)),
    url(r'^v0/advanced/has_sequence', views.create_ajax_handler(actions.has_sequence)),
    url(r'^v0/advanced/has_type', views.create_ajax_handler(actions.has_type)),
    url(r'^v0/advanced/get_schema_names', views.create_ajax_handler(actions.get_schema_names)),
    url(r'^v0/advanced/get_table_names', views.create_ajax_handler(actions.get_table_names)),
    url(r'^v0/advanced/get_view_names', views.create_ajax_handler(actions.get_view_names)),
{'fraction_non_alphanumeric': 0.24502644170234197, 'fraction_numerical': 0.008813900780659783, 'mean_word_length': 5.919860627177701, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1005701', 'n_tokens_mistral': 1664, 'n_tokens_neox': 1597, 'n_words': 113}